Primitive mesh off center orientation
Blitz3D Forums/Blitz3D Programming/Primitive mesh off center orientation
| ||
When i create a cube and position it at 0,0,0 using PositionMesh, the center of the mesh is at the specified position. I want the bottom left corner of the mesh at the specified position. Is there a way to do this? |
| ||
Use PositionMesh 1.0,1.0,z# z# would be the location Forwards or Backwards to place the Mesh relative to the 'Pivot point' |
| ||
Yes, relative to the entity pivot point, but not the mesh pivot point. I only want to use mesh commands. I think i figured it out, CreateCube() creates a mesh with dimensions from -1 to 1, so the pivot point is at the center and the scale is 2 units. I wrote mi own CreateCube() function to create a cube of 1 units and the mesh pivot point where i want. |
| ||
Else, use FitMesh ie FitMesh cube, -0.5, -0.5, -0.5, 1, 1, 1 |
| ||
You can also use PositionMesh to offset the mesh in relation to its own pivot. |