I am new to Box2D, I have set gravity to 10. How to make an object fly in space even though the gravity is 10. What are the properties I need to set to make object fly? Is there any different approach?
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
|
It sounds like you essentially want to have specific objects ignore gravity, is that correct? Since gravity is a property of the world object, it looks like the way to do this is to either
You also may be able to use a |
|||||||||||||
|
|
In general, the best way is to make your object dynamic and add a force to it in every frame, to the left or to the right. What I mean is that you can determine your path and calculate the force by considering the weight and gravity, which is why you apply the force to the bird. I think it's the best way, and also the most realistic. |
||||
|
|
