Archived

This topic is now archived and is closed to further replies.

black_mage_s

Collision Detection Complete Do Over

Recommended Posts

black_mage_s    103
Alright, heres the deal, i have a collision detection program that works relatively well but i have to scrap the entire thing. what i need is a Terrain Collision Detection program that willalter the position of the chracters leg and how they affect the body depending on the hieght of the ground between them. Is this possible? Or, more accurately, is there and efficient way to do this with a single model?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Not enough info really to help.

You using heightmaps? If so, then you know the height of the terrain, and use it that way.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
What you want to do, is to determine the normal of the polygon your character is standing on. You then use that vector and use it to rotate your character, so that he is slanted in the same direction as the polygon your standing on.

Share this post


Link to post
Share on other sites
black_mage_s    103
I was looking for more of a way so that it wont look like the character is falling over.

More like ifthe land is slanted, one leg will be high than te other, but bent at the knee, keeping the torso at a near90 degrees

Share this post


Link to post
Share on other sites
eldee    122
this is as easy as a conditional statement...
just test the angle, and if it''s more than 45 degrees or
whatever, then alter the mesh..
if you''re using a loaded mesh, then i''d suggest having
a specific animation for it.. if you''re using multiple objects
it''s done the same way. instead of changing the animation
or whatever you''d just alter the position of the object in
question.. (foot, leg, ect...)

-eldee
;another space monkey;

Share this post


Link to post
Share on other sites
GalaxyQuest    122
If you got keyframe animation, then the above poster is correct, you will need to make another animation for walking/running on angled terrain.

Otherwise, you need skeletal animation and bones which influence other bones. I looked at OPERATION FLASHPOINT(great game!!) which i am 95% sure uses skeletal animation, and the body''s legs and waist were at a tilt according to collision of each foot on ground. (I ran my character to a hill and it looked this way, so I am also only going by what i see).

Share this post


Link to post
Share on other sites