Actor vibrating after movement
Hi there,
I am trying to achieve the following :
If self.X is < than Device.position.X , move right.
If self.X is > than Device.position.X, move left.
I manage to get my actor to move, but it vibrates after stopping.
I've tried Self.X = Device.position.X, move left at speed 0 (to force it to stop), but it didn't work.
Any help?
Thanks in advance.
I am trying to achieve the following :
If self.X is < than Device.position.X , move right.
If self.X is > than Device.position.X, move left.
I manage to get my actor to move, but it vibrates after stopping.
I've tried Self.X = Device.position.X, move left at speed 0 (to force it to stop), but it didn't work.
Any help?
Thanks in advance.
Comments
Try making a 'dead zone' where you can set speed to zero. Something like:
If self.X is < than (Device.position.X - 5) , move right.
If self.X is > than (Device.position.X + 5), move left.
thanks for your reply. Allow me to give this a shot. Will let you know soon.