I am working on VisionOS app and I have a RealityView that calls a scene created in RealityComposer Pro. I have added drag and rotate gestures to my object. The gestures work fine but I want to be able to rotate from a selected point on the object rather than the default center point.
An example would be if I had cube I and I select the corner the rotation would happen around the corner point instead of the center point
Use
rotation3DEffect(..)instance method that allows you to rotate the whole view containing a model in three dimensions around the specified axis (with specified pivot point calledanchor).For
anchorparameter, you can useUnitPoint3D(x:y:z:)initializer: