Game Development Community

Angled ladder possible?

by jydog · in TGB Platformer Kit · 05/06/2008 (4:47 pm) · 2 replies

I would like my player to be able to climb an angled tree.

I placed a ladder trigger that I can climb at 0 degrees. I can angle it a few degrees and climb it. But after 5 or so degrees he will not latch on. Can something be done to allow greater angles?

I use angled slippery platforms elsewhere but this really could use an angled ladder if possible.

Randy

#1
05/06/2008 (5:08 pm)
Interesting idea Randy, it is definitely possible. You would need to do two things:

1. Account for the rotation when checking for ladder attachment. At the moment it tries to attach itself to the x-axis center of the ladder and assumes that this does not change.

2. In the updateOnLadderPhysics, you would also need to account for the angle of the ladder. Instead of pressing up and only moving along the y-axis, you would need to move along both x and y.

The maths behind these ideas are pretty basic and I even think that the formulas are provided somewhere in kit.
#2
05/06/2008 (5:37 pm)
Thanks. Will be looking into it. (Will take time though.)