Game Development Community

Walk up angle question

by Brandi Alotto · in Torque X Platformer Kit · 08/30/2007 (3:37 pm) · 4 replies

Now that I am in the right place. Does anyone know how to change the limit of the angle the player can walk up? I would like my player be able to walk up an angle of 45 degrees, but nothing more.

I would really appreciate any help. Thanks

#1
08/30/2007 (4:21 pm)
You'll want to modify the MaxGroundNormalY property of the ActorComponent.

Description from the API docs:
Quote:
The maximum value of the Y component of the surface normal of a platform to allow the ActorComponent to consider it as a ground surface.

The default value is -0.1. For a 45 degree angle limit you'll want to set the value to -0.71 for a safe limit or -0.7071068 for a more exact 45 degree limit.
#2
08/31/2007 (4:55 pm)
Thomas is the man.

Not the man that drinks our wine and steals our earth, either...
#3
03/26/2008 (8:53 am)
1. What could I do that the drills could climb perpendicular walls?

2. I was experimenting with MaxGroundNormalY of the drills but I got error messages that the following code is missing:

ActorComponent obj2 = (ActorComponent) obj;
obj2.MaxGroundNormalY = MaxGroundNormalY;

But when I insert the (second line of) code into the CopyTo method I got the message that there is no MaxGroundNormalY in the PlatformerFramework.
#4
03/28/2008 (9:28 am)
The suggestion of the debugger must have made me blind...
Of course i have to insert

obj2.MaxGroundNormalY = MaxGroundNormalY;

in the DrillActorComponent and not in the ActorComponent as the error message said...

But my drills still cannot climb perpendicular walls. If I set MaxGroundNormalY=0.000 then they will climb walls with an angle of about 80 degrees but not 90...