Game Development Community

Exiting Cheetah causes player to fall through world

by Vince Gee · in Torque 3D Professional · 02/13/2012 (9:45 pm) · 3 replies

If you repeat getting into the cheetah and out, over and over, about the 3rd or 4th time you will fall through ground. Not sure what is causing it, tried increasing the z coord of the transform to fix, but it still occurred.

File Game/Scripts/Server/Player.cs

Line 151
%obj.setTransform(%pos SPC %rot);

P.S. it was tested on a clean build of T3d :)

Vince

#1
02/13/2012 (9:55 pm)
btw, if you change the impulse vector's z to a positive 1, it applies enough upward velocity to prevent the player from falling through the world.
#2
02/29/2012 (4:11 pm)
Kinda old, but I believe you can also fix with getTerrainHeight(); :P

%oPos = getWords(%object.getTransform(), 0, 2);
%gotoPos = vectorAdd(%oPos, "1 1 0");
%zGoto = getTerrainHeight(%gotoPos);

%finalPos = getWords(%gotoPos, 0, 1) SPC %zGoto;
#3
03/01/2012 (7:19 am)
On uneven ground I bet.