Planet Gravity
dmilinovichiii
Member Posts: 620
Does anyone know how to measure the distance between two objects so I could create a planet and have something pulled towards the planet faster the closer it gets?
Comments
http://gamesalad.com/game/play/67052
Then when an object collides with the invisible actor, it makes the actort move towards the invisible actor's centre (and thus, the planet).
I use it for black holes
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
`magnitude( self.Position.X - game.VicX , self.Position.Y - game.VicY )`
The above expression gives you the distance between the star's position and that of the planet which is constrained to "VicX" and "VicY"