Sign in to follow this  
ReKlipz

Physics Engine Questions...

Recommended Posts

OK, heres the scoop: A friend and I have a partially working OpenGL engine that we've been working on currently it supports the following: Quake III BSP maps(doesnt have bezier done yet, and doesnt do textures fully right, doesnt have collision detection or anything) Doom III(Quake IV) MD5 models(can't deform the meshes or anims yet, but can play em) and thats about it for importing things like that... What we were thinking of doing for our physics engine was this: There is the main gravity source(earth's gravity) which always pulls you down(is lets say always 100 units below you...) and then we were thinking of adding multiple gravity sources support, so like an entity in the map could be like FUNC_GRAV or something, and it would pull stuff toward it... What we are currently stuck on is the actual moving of the models(objects) toward the gravity source, we can do it along an axis(2D), but were unable to find ANY sources that explain how to move toward a gravity source along a 3D path... does that make sense? If anyone can help it would be GREATLY appreciated. Thanks for any help in advance! ~ReKlipz

Share this post


Link to post
Share on other sites
I would recommend not worrying about a 'physics engine' per se, especially if you don't have collision detection in place yet. A general physics engine is a complicated endeavor. I don't know what sort of game you're making, but a lot of FPS-style games - Quake and so on - got away with more or less ad hoc physics. For example, it sounds like you want to be able to support objects that pull other objects toward them. For this you could do something like:
Vector3 direction = normalize(gravityObject.position - player.position);
player.position += direction * pullAmount * timeStep;
That's a very simple approach and doesn't consider acceleration, but it's an example of the sort of solution you can come up with when you know the exact effect you're looking for.

Share this post


Link to post
Share on other sites
OK, thanks for the help, I'll have to check it out and see what I can muster up...

Rating ++

OK, now that was weird, I rated you somewhat helpful / friendly, and it made your rating go down... totally not what I wanted...

I didn't do extremely, just cause it wasnt extremely... but it was helpful... IDK, sry bout that though...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this