Mesh Animation - Ways to rotate part of a mesh?
Blitz3D Forums/Blitz3D Programming/Mesh Animation - Ways to rotate part of a mesh?
| ||
Hi I had a look through the code archives but I couldn't find anything to help me. I have a single mesh divided into 100 units, some of those units may be facing a diferent direction to others within that mesh. Are there any readily available functions or formulas to rotate part of a mesh around it's 'local' origin? All the units share the same 'local' origin. Thanks for any help. Cheers GrumpyOldMan |
| ||
Hi GrumpyOldMan, Are there any readily available functions or formulas to rotate part of a mesh around it's 'local' origin? As far as I know, there's no such a command. What you could do, is to move the vertex which belongs to the part of the mesh you want to rotate, in order to perform the needed rotation.You may have a look at the command VertexCoords, which is there exactly for that purpose. http://www.blitzbasic.com/b3ddocs/command.php?name=VertexCoords&ref=3d_cat The way you have to move the vertex to perform a geometric rotation, involves a bit of math though; try out first with simple meshes, then apply the concept to the whole mesh. Hope this helps, Sergio. |