terrain problem
Blitz3D Forums/Blitz3D Programming/terrain problem
| ||
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. |
| ||
You could look into using the collision normal commands, CollisionNx() etc, and check the values. |
| ||
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. |
| ||
i don't know how the collision normal commands work |
| ||
You could linepick to see the difference between last and new height and move the player back if it's too high. |
| ||
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) |
| ||
okay. thanks. |