|
-
Feb 10th, 2010, 07:25 PM
#1
Gravity calculations in a 3D world.
Hey.
I'm having troubles expressing myself this evening so I hope I make sense, if not, please do tell.
Alright so I'm working on a 3D game as a part of some university coursework.
In this game I have simple gravity, pulling objects straight down.
Currently, gravity is only applied to an object if it is in freefall. As soon as it hits the ground, I do not apply any gravitational pull on it unless it "stops" being on the ground.
I would like to change this. I would like to calculate the resulting force to be applied to an object given the slope of the surface it is standing on. (In other words, an object standing on a completely flat surface would be at rest, while an object standing on a steep slope would slide down).
I hope this makes sense.
The problem:
I have a vector defining the gravitational force (straight down) for an object.
I have another vector that is the normal for the plane directly underneath the object.
From this, I must somehow calculate the resulting force on the object.
I've been at this problem for the entire day, but I just cant figure it out
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|