• Player Position, Compared to the world ?
    1 replies, posted
I want to know if a player is pushed up against a wall. I've tried using EyeTrace but it doesn't seem to work! What am I doing wrong or is there a better way of doing it? [CODE] local eyePos = self.Owner:GetEyeTrace() local owner = self.Owner local ownerPos = owner:GetPos() local aimPos = eyePos.HitPos if ( ownerPos:Distance( aimPos ) < 50 ) then print( "Against Wall" ) else print( "Away from Wall" ) end [/CODE]
EyeTrace is the way to do it. Just check the Distance between trace.HitPos and trace.Start( or simply Player:EyePos()/GetShootPos() if you are using GetEyeTrace() ) and check if trace.HitWorld == true.
Sorry, you need to Log In to post a reply to this thread.