Parent : system
Factors related to collisions of players and objects colliding with a freeform.
Height Calculation
The following attributes are used in height calculation
0.2 collisiontrianglewidth
_____
\ / 0.3 roomdiff
\ /
roomdiff float
A triangle is used to test the collision with a freeform (eg town). This is the height of the triangle and is usually the height you'd expect of a room inside of a building.
collisiontrianglewidth float
This is the width of the collision triangle when calculating the ground height.
heightmaximum float
When determining height using 'withcollisiondown' the collision triangle start of at a certain height above the terrain and moves down until it strikes a freeform such as a town. For towns with rather high points then a higher value may be necessary though will use more computation time.
Horizontal Collisions
The following are attributes regarding collisions with walls
v3 ----
| ------ v2
| |
rectwidthclose o rectwidthtip
| |
| ------ v1
v4 ----
rectwidthtip
For the triangle you are using to test with a collision with a wall this is the width of the tip of the triangle.
rectwidthclose float
For the triangle you are using to test with a collision with a wall this is the width of the part of the triangle closest to the camera
bouncebackdist float
If a horizontal collision is detected then this is the amount of distance a player will bounce backwards after colliding with the object, eg a wall
dropheight float
To stop players falling off large drops in a town (eg a wall) it is possible to specify a drop height where if in front of the camera there is a drop over a specified amount then it is consider a horizontal collision and the player cannot move forward