Best way to do gravity?
by Charles Randall · in Torque X 2D · 09/07/2008 (6:51 pm) · 2 replies
I'm curious what the best way to do gravity is. So far, the best solution I've found is to add a force component to simulate it, but this introduces a number of problems. First, I now have to individually manage and create gravity for every game object. Second, for customized collision routines (stick/bounce/clamp doesn't do what I want), I then have the problem of trying to sort gravity out of my physics vector in order to apply my own custom management, which is a pain as well.
Any suggestions? Alternate methods?
Any suggestions? Alternate methods?
#2
09/09/2008 (6:16 am)
Well, it's a 2D platformer in terms of movement and such. I'd considered iterating through everything and just applying gravity, but I was simply curious if there was a better way to do this, i.e. a method provided by the engine.
Associate John Kanalakis
EnvyGames
John K.