Where to go from here?
Hey everyone!
So for background, Im developing in C++ using OpenGL. My goal is basically to have a 'tile' that floats in space. The arrow keys tilt the tile as you'd expect. This part i have done, no problem.
Now I want to add a 'ball' that sits on the tile and when you tilt the tile the ball will roll accordingly (assuming gravity is pulling down, etc.)
Im not sure where to start with this? Do i need a physics engine? If so are there any articles on this site or out in general that explain using a physics engine?
Hum, there are 2 ways I see of doing this.
1 - With physic
2 - faking it, and tilting the camera, not the tile
I'm going to explain briefly that second options, first one being: Use a common physic engine: Bullet, Havok (Now free for hobby) etc.
When you tilt the plane, fake the tilting with the camera rolling instead. Then, accelerate the ball on the X,Y planes (Assuming your Z is up) in the direction of your tilting. Very simple.
But if you have more complex situations, it might get tricky. This is only for a ball on a plane.
1 - With physic
2 - faking it, and tilting the camera, not the tile
I'm going to explain briefly that second options, first one being: Use a common physic engine: Bullet, Havok (Now free for hobby) etc.
When you tilt the plane, fake the tilting with the camera rolling instead. Then, accelerate the ball on the X,Y planes (Assuming your Z is up) in the direction of your tilting. Very simple.
But if you have more complex situations, it might get tricky. This is only for a ball on a plane.
I am going to look into those 2 engines you proposed and see what I can do there.
As for tilting the camera, i had actually thought of that, but as im looking to expand beyond just the ball on a tile, i figured i might as well do it the 'right' way.
As for tilting the camera, i had actually thought of that, but as im looking to expand beyond just the ball on a tile, i figured i might as well do it the 'right' way.
You have quite a few physic engines to chose from besides the ones Daivuk helpfully suggested; Physic and maths forum
Yeah i had seen that list on the physics forum.
Ive looked at the sites for Bullet and Havok. Didnt really try either yet, but leaning towards bullet since i would like to be able to see the code and possibly make alterations if possible.
Am i correct in saying that Havok seems to only give you binaries but Bullet will give you source. It would probably help to say that im a big math guy and physics simulation, AI, etc. are more my interests as opposed to straight up game designing such as graphics, sound, and that sort of thing (i am interested in this a little, but certainly not my focus)
Ive looked at the sites for Bullet and Havok. Didnt really try either yet, but leaning towards bullet since i would like to be able to see the code and possibly make alterations if possible.
Am i correct in saying that Havok seems to only give you binaries but Bullet will give you source. It would probably help to say that im a big math guy and physics simulation, AI, etc. are more my interests as opposed to straight up game designing such as graphics, sound, and that sort of thing (i am interested in this a little, but certainly not my focus)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement