A Question About Restitution
RH
Member Posts: 1,079
Hi,
If, for example, I have a ball that falls due to gravity and I have an actor called ground at the bottom that it collides with, I have the restitution of the ball set 0.6 and the restitution of the ground set to 0. When i play the game the ball drops and bounces up and falls and bounces just how i want it to. However I want it to stop bouncing when its maximum bounce height reaches a certain amount. I can't figure out how to do this though and I have been trying for a long time. It's probably a lot easier than I am making it
Hopefully that is worded clearly,
Thanks for any help
Edit: I should probably add that at the moment the ball just ends up doing little bounces on the spot, it's kinda annoying
If, for example, I have a ball that falls due to gravity and I have an actor called ground at the bottom that it collides with, I have the restitution of the ball set 0.6 and the restitution of the ground set to 0. When i play the game the ball drops and bounces up and falls and bounces just how i want it to. However I want it to stop bouncing when its maximum bounce height reaches a certain amount. I can't figure out how to do this though and I have been trying for a long time. It's probably a lot easier than I am making it
Hopefully that is worded clearly,
Thanks for any help
Edit: I should probably add that at the moment the ball just ends up doing little bounces on the spot, it's kinda annoying
Comments
rule 1:
when ball overlaps or collides with hotzone
change self.StopBouncing to 1
rule2:
when ball overlaps or collides with floor
AND
self.StopBouncing is 1
change velocity to 0
You could also adjust this to work with a certain Y value
when self.Position.Y is > 200
change self.StopBouncing to 1
and then the same rule 2
does that make any sense?
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Thanks