actor change direction
MrRude
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
Any suggestions on how to accomplish this?
Thanks
Best Answer
-
RThurman Posts: 2,880To 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
Thanks for the input.