terrain problem

Blitz3D Forums/Blitz3D Programming/terrain problem

skyfire1(Posted 2005) [#1]
whenever i load a heightmap into a program and add slidding collision between the player and the terrain, i noticed that no matter how steep a certan part of the terrain is, the player will always be able to climb up that part of the terrain. is there any way to stop this problem? any help appreciated.


Ross C(Posted 2005) [#2]
You could look into using the collision normal commands, CollisionNx() etc, and check the values.


John Blackledge(Posted 2005) [#3]
The way I stopped this was by increasing my gravity variable to allow a climb up a mild slope, but not up a steep slope.


skyfire1(Posted 2005) [#4]
i don't know how the collision normal commands work


ozak(Posted 2005) [#5]
You could linepick to see the difference between last and new height and move the player back if it's too high.


Ross C(Posted 2005) [#6]
Well, the collision normal commands will return the angle of the triangle/vertex? involved in the collision. This will be a number between 0 and 1. If this number is above a certain value, then the slope is too steep. Say, above 0.7. I think you would be wanting to use the CollisionNY() command for this :o)


skyfire1(Posted 2005) [#7]
okay. thanks.