playMaker

Author Topic: Issue with Mouse Pick 2D and multiple joints  (Read 1236 times)

picklesandtickles

  • Playmaker Newbie
  • *
  • Posts: 13
Issue with Mouse Pick 2D and multiple joints
« on: January 07, 2018, 09:59:33 PM »
Hello Playmaker Community,

Bottom line up front: I'm having an issue where most of the player's hinge joints fall apart and the movement becomes erratic when I try to run the FSM included in my Input Manager object with Move Towards action. Here's a demo with the FSM first enabled, and then disabled: https://youtu.be/V-v9Im0qYsg.

Now for some context: 

I'm working on a 2D game involving a player composed of sprites hooked together with multiple hinge joints (think "Mount Your Friends"). With Playmaker, I'd like to be able to click and drag anywhere on the scene, and have the central body of the player move in the opposite direction of the mouse.

In other words, when I click above the player's head and drag down, I'd like the body to move up toward the mouse, keeping all hinge joints (connecting arms and legs) connected while it moves.

Before I do all that, though, I just want to get some basics down. I've walked through a couple tutorials and read the documentation on Pick Mouse and Pick Mouse 2D to get the mouse position and set it as a target toward which the body of the player moves, but as you can see from the video above, I'm running into some serious problems.

Any recommendations for easier ways to do this with Playmaker, or if not, areas within my setup where I can troubleshoot? Let me know if you need additional information to help diagnose. Thanks!