Import sidesign.minib3d Graphics3D 800,600,32,2 Local camera:TCamera = CreateCamera() PositionEntity camera,0,0,-10 light:TLight = CreateLight() RotateEntity light,45,-90,0 Local cube:TEntity = CreateCube() RotateEntity cube,0,0,45 While Not KeyDown(KEY_ESCAPE) Cls TFormVector 0,1,0,cube,Null Local X:Float = TFormedX() Local Y:Float = TFormedY() Local Z:Float = TFormedZ() UpdateWorld RenderWorld Text 5,5,X Text 5,20,Y Text 5,35,Z Flip 0 Wend EndGraphics End
You have to save the values before calling Updateworld or Renderworld. It seems these function resets the values to 0.
Difference between TEntity and TMesh is more or less simple:
TEntity is the main type and nearly all others (TCamera,TLight and TMesh) are extended from this type.
You could call every Entitycommand without problems with TMesh etc. But not the other way around. Therefore you have to explicit cast to eg: TMesh.
Also Entitycommands (like RotateEntity) manipulate only the matrices. Meshcommands like RotateMesh transform the whole mesh, each Vertex,Triangle etc. so in fact you get a completely new mesh.