actor change direction

MrRudeMrRude Member, PRO Posts: 8
Trying to get an actor to change directions based on the direction he is facing when hitting a block on a platform. I can get it to change once, but I basically want it to hit a block on the right, turn around and walk left, then when it hits another block, turn back around and walk right. So basically if nothing else happened, the actor would bounce between the two blocks without stopping.

Any suggestions on how to accomplish this?
Thanks

Best Answer

  • RThurmanRThurman Posts: 2,879
    Accepted Answer
    To get an actor to move in "x" you could change its linear velocity:
    Change Attribute: [self.Linear Velocity.X] To: [100]

    When it hits a block then change its x velocity to the opposite:
    Change Attribute: [self.Linear Velocity.X] To: [-1*self.Linear Velocity.X]

Answers

  • MrRudeMrRude Member, PRO Posts: 8
    Not quite what I was looking for, but after reading your post, it dawned on me that I was indeed overcomplicating things. I created 2 separate rules and accomplished what I was after.

    Thanks for the input.
Sign In or Register to comment.