How to stop an actor from accelerate after x-y position
Abdilatti
Member Posts: 43
Lets say that we have an actor:
Accelerate
Direction: 90
Acceleration: 20
When the actor has reached a certain x and y position, I would want it to stop moving, how can I do it?
Thanks in advance
Comments
@Abdilatti The best method i have found is to make a self boolean lets call it Moving set to true (check the box) now if self.position.y > 290 for e.g. change self.Moving to false and simply use a rule if self.Moving is false move direction 0 speed 0.
I used to use constrain motion linear x & y to 0 but this works better imo as the code is lighter.
Demo project attached…
Darren.
@DeepBlueApps Thank you man i will try this out
Let me know how you get on.
Darren.
@DeepBlueApps Yeah it worked, thanks alot!
Glad I could help gl with your game.
Darren.