Gravity Proof Object
decaoeu
PRO Posts: 61
Guys i have a scene with gravity Y of 100, and a wanna put clouds in the scene, but when i do that all my clouds fall of the sky, what is the best way to make the clouds gravity proof.
Thanks!
Thanks!
Answers
If I were you, I would rethink your approach a little bit. Set the scene's x and y gravity to 0. Then, have only the things you want to be effected by gravity use the accelerate behavior. Have the direction going down, and choose the amount of gravity you want.
Now, when you want static actors, you don't even have to worry about doing anything! For instance, your clouds will only need a simple interpolation of the x coordinates, or change attribute: self.motion.linear.velocity.x.
Hope this helps,
Jack McGraw
Jamie
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page