Game Development Community

Sliding corpses

by Jeff Wellock · in Torque Game Engine · 08/26/2001 (9:37 am) · 3 replies

In my game, i've made the player corpses stay around for a very long time, but they slide down the smallest hill and look really really dumb, is there anyway to fix this? to get them to stand still? or to get them to only slide down steep hills. Any help is appreciated

#1
08/26/2001 (2:16 pm)
Yep, there's a way.. and for the life of my I cant remember where in the code it is.. :))

oh well, another useless post.

You need to find the slope at the contact point in the collision test.. and change the forward velocity if the slope is low..

basically, add some friction into the calculation OR simply cap a small movement velocity to zero (i.e. do a length() on the velocity vector, and if its too small set it to zero).
#2
08/26/2001 (3:46 pm)
look for the respwn post they talk about keeping bodies still
#3
08/28/2001 (9:14 am)
There was an earlier post that mentioned using the disableMove() function on a player when he dies. This function is what's causing the problem. Removing it should fix your problem.