How can I move a TModel3D to another TModel3D in Delphi FMX

To move a TModel3D component to another TModel3D component in Delphi FMX, you can use the Position and RotationAngle properties of the TControl3D class, which is the base class for TModel3D.

Here’s an example of how you can use these properties to move a model to a specific location relative to another model;

This will move Model1 to a position 10 units to the right, 20 units above, and 30 units in front of Model2, and rotate it 45 degrees around the X axis, 60 degrees around the Y axis, and 75 degrees around the Z axis relative to Model2.

You can also use the Matrix property of the TControl3D class to directly manipulate the transformation matrix of the model, which can be useful for more complex transformations or animations.


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *