Mesh Placement
Blitz3D Forums/Blitz3D Beginners Area/Mesh Placement
| ||
I have looked through the book... honest! Can I move the "hotspot in a mesh, I need to put the hotspot at the bottom of buildings meshes to help placing them. Dicon |
| ||
PositionMesh will move the actual vertices/triangles of the mesh, and not affect the entity position. So, something like... PositionMesh mesh,0,MeshHeight(mesh)/2,0 This should move the mesh up, by half it's height. I'm sure it's a relative thing, so calling that again will move the mesh again. The above piece of code, assumes the meshes 0,0,0 axis is in the middle of the mesh. If that's not the case, you'll need to do something like: FitMesh mesh,-meshwidth(mesh)/2,0,-meshdepth(mesh)/2,meshwidth(mesh),meshheight(mesh),meshdepth(mesh) mesh being your building or whatever you need the axis to be at the bottom. Fitmesh is absolute, so no matter how many times you call the above, it won't change it's position any further. |
| ||
Thanks Ross C, that does work, because at the moment all the axis are in the center. Thanks Dicon |