Stop actor from flipping out!
philm
Member Posts: 8
Hi, I will say upfront I'm a newbie and hope this question is easy to answer, though I've looked on the forums and can't find an answer...
I have an actor (a car), when it goes over a ramp or drops over a ledge it tumbles (ending up on its roof or side) and keeps going. How to I stop it doing this?!
Note: I want it to tilt when it goes up/down hills etc which it does just fine at the moment.
I have an actor (a car), when it goes over a ramp or drops over a ledge it tumbles (ending up on its roof or side) and keeps going. How to I stop it doing this?!
Note: I want it to tilt when it goes up/down hills etc which it does just fine at the moment.
Comments
So, the one of the things you can try, is to create an actor (e.g. STOPPER) and place it on the roof. In the car actor place attribute:
Collide with actor of type STOPPER
And on the left-side panel in car actor, set bounciness to 0, and then in physics tick fixed rotation
Then in the STOPPER actor set bounciness to 0 in that panel. And also in Physics (which is also there in panel ) UNtick Movable and tick fixed rotation.
Also in STOPPER graphics set blinding mode to multiply. It will become invisible.
Hope it helped!
MadCursor
Rule:
if self.rotation > 45
Change Attribute self.rotation to 45
A rule like that would stop your actor from rotating beyond 45°.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page