Firemonkey model3d resetting position and rotation

  

By Flash Thunder I got a model that on startup has:

Position = (0,8,0);
RotationAngle = (0,180,180);

Added a function to rotate it by mouse… that changes model RotationAngle … and works fine.

Now I need a button to reset it to previous state, but setting Position and RotationAngle to values that were at beginning. But it doesn’t work. Depending of the posision from which it was reset I am getting different results from reset function…

Reset function looks like this:

Model3D1.Position.Vector := Vector3D(0,8,0);
Model3D1.RotationAngle.Vector := Vector3D(0,180,180);
Model3D1.Scale.Vector := Vector3D(50,50,50);

How do I really reset it state to the one at beginning? …read more

Via: StackOverflow

Comments are closed.