# Physics Engine Questions...

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

## 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 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 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 on other sites
Quote:
 sry bout that though...
No worries :)

1. 1
2. 2
Rutin
23
3. 3
4. 4
5. 5
khawk
14

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633653
• Total Posts
3013159
×

## Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!