Jump to content
  • Advertisement
Sign in to follow this  
ReKlipz

Physics Engine Questions...

This topic is 4704 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!