View Full Version : Checking if a pawn is on the wall
2nd Nov 2001, 11:12 PM
Is there a way to check if a certain pawn is on the wall?
Say I have a scriptedpawn with phys_spider and I want to check when its crawling on the wall or ceiling to go to another state, how would I go about doing this?
3rd Nov 2001, 07:51 AM
Hmm, not sure about this. I think you either need to find the surface normal, or use the pawn's rotation. Then check if this is within a certain angle. Maybe something like this:
local Vector X, Y, Z;
GetAxes (Rotation, X, Y, Z);
if ( (X Dot vect(0,0,1)) < 0.5 )
// then on wall or ceiling
3rd Nov 2001, 03:13 PM
nm, I remembered how to do it last night.
9th Nov 2001, 06:51 AM
Would it be rude of me to ask how? /me is interested now...
vBulletin® v3.8.7, Copyright ©2000-2014, vBulletin Solutions, Inc.