Subclassing / Modifying the built-in gesture recognizers

Hello,

RealityKit offers an awesome interface to install gestures for the common interactions with the virtual object in the 3D space.

One of them is the EntityTranslationGestureRecognizer to move the 3D object in the 3D space. When checking the documentation I found the velocity(in:) method which I'd like to modify to limit the speed an object can be moved through the 3D space.

https://developer.apple.com/documentation/realitykit/entitytranslationgesturerecognizer/3255581-velocity

I didn't find a straight forward way to subclass and install this gesture recognizer yet. Do I miss something?

Best, Lennart

Answered by ForumsContributor in
Thanks for clarifying the issue in a 1:1 session.

For other engineers coming across this issue and may face the same question,
I will post a working UIGestureRecognizer in the upcoming days.
Accepted Answer
You might be better off subclassing UIPanGestureRecognizer instead and building out the movement from there - I’ve done this a few times and it does work well.
Subclassing / Modifying the built-in gesture recognizers
 
 
Q