AB4D Forum

Full Version: Point3d position
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everybody, I need an help..
I have in my scene a sphere and a 3dpoint wich is the centerposition of the sphere

When i make a transformation to the sphere i need to move the point to the new sphere centerposition but if i read the new center position of the sphere after the transformation i get the original position ever.

How i can move the point to the new center position? 
Thanks for replies
Do you mean SphereVisual3D.CenterPosition as the "centerposition"?

You have two options:
1) instead of applying a TranslatTransform3D on the SphereVisual3D, you can just change the value of the CenterPosition.

2) to get the transformed centered position you can use:

var transformedCenter = modelVisual3D.Transform.Transform(sphereVisual3D.CenterPosition);

Note that transformation are hierarchical - so you can have a hierarchy of objects - for example:


So if you apply the transformation to the first ModelVisual3D this will transform all child objects, but CenterPosition on SphereVisual3D and BoxVisual3D will not change - the values of those properties are defined in the local coordinate system (and not in world coordinate system).