Collision normals and vectors.
Blitz3D Forums/Blitz3D Programming/Collision normals and vectors.
| ||
I`m still having difficulties understanding how collision normals work. Could someone please help me and create a simple box going over a terrain and aligning to it using its colllision normals, i.e. using align to vector but also draw the collision normal on screen so that I can get a better idea of what it happening. Also can someone offer a simple to understand description of what a vector actually is. Thanks, Jason. |
| ||
You can image a vector by imagining a 3d grid, and then imagining that one end of a vector is anchored at 0,0,0, and the other end is anchored at the location defined by the XYZ value of the vector. You can draw a vector in 2D pretty easy too so that will help. Draw two lines, one vertical one horizontal. Make them intersect. Draw a line from the point of intersection to some other point. That is a vector. If that vector is (1,1), then that vector would be pointing towards the upper left. A normal is a vector with a length of 1. (1,1) is not a vector with a length of 1. That is the corner of a cube. A vector with a length of 1 would lie on a circle with a radius of 1 no matter which direction it points. |