Rotate a Mesh like an Entity?

Blitz3D Forums/Blitz3D Programming/Rotate a Mesh like an Entity?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Thanks, TFormPoint does the job.

Function TransformMesh(mesh,entity)
msurface=GetSurface(mesh,1)
esurface=GetSurface(entity,1)
numverts=CountVertices(msurface)
For i=0 To numverts-1
TFormPoint VertexX(esurface,i),VertexY(esurface,i),VertexZ(esurface,i),entity,0
VertexCoords msurface,i,TFormedX(),TFormedY(),TFormedZ()
TFormNormal VertexNX(esurface,i),VertexNY(esurface,i),VertexNZ(esurface,i),entity,0
VertexNormal msurface,i,TFormedX(),TFormedY(),TFormedZ()
Next
End Function