Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Newton - Preventing player from sticking/falling through the terrain.

Author
Message
Game pro
20
Years of Service
User Offline
Joined: 21st Mar 2004
Location: Usa
Posted: 19th Jul 2008 04:57
I have two questions.

So I have my Character body with Mass, and all the other physics data set up. I've got gravity working. Here's the problem...if my character is falling too fast he will go right through the terrain. Even if he hits the terrain at a slower velocity he will still sink through it a little.

I need to know how I can prevent my character from sinking through the ground when he falls at a fast velocity. Any ideas?

Check out my dev forums at:
http://z15.invisionfree.com/ProjectRWP
trogdor
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: Portsmouth, VA, USA
Posted: 19th Jul 2008 09:50
I dont know newton, but if there is no newton solution you could do something like this


If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 21st Jul 2008 06:58
I've had objects slowly ooze through static objects and eventually fall through them. I believe it was because I did not set moment of inertia values. Do you use any of the NDBCalculateMIBxxxx functions? Or fill in values for the set mass matrix?

If it is because the object is actually falling too fast for collision to be registered properly, then you need to do time-slicing. Here is some pseudo code.
http://forum.thegamecreators.com/?m=forum_view&t=133423&b=1

I'm not a real programmer but I play one with DBPro!

Login to post a reply

Server time is: 2024-04-24 12:20:34
Your offset time is: 2024-04-24 12:20:34