Actor pushes/moves another actor

TboneTbone Member Posts: 49
edited November -1 in Working with GS (Mac)
Hello,

Im attempting to have one actor (hero) push another actor (rock).

How can I have the hero push the rock in relation to his direction? ie if Hero pushes from the top, the rock moves down or if the hero pushes from the left the rock moves right?

I set up a game attribute that tracks the hero linear velocity (both X and Y) and made a rule that checks this and applies an opposite position to the rock.

This works fine on the X but on the Y I get a diagonal movement instead of straight up or down.

Does this make sense? Can anyone shed any light on how I could achieve this?

Comments

  • butterbeanbutterbean Member Posts: 4,315
    Try constraining the rock to the Y axis, if it's sitting around 100, constrain it to 100, and see if the actor pushing it can push it straight instead of diagonal

    To find your rocks position on the Y axis, click on the actor, and check "position" Y, constrain it to that, and see if that helps
  • TboneTbone Member Posts: 49
    Thank you butterbean. This helped me out. Very much appreciated.
Sign In or Register to comment.