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

Replies

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.
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.
  • Like @lennart.at.westwing, I haven't been able to utilize the EntityTranslationGestureRecognizer. The UIPanGestureRecognizer works to move entities around surely, but it's just not great in 3D space & not very convenient. The documentations suggests that, it is a gesture recognizer that uses a pan gesture to move an entity in 3D space ... but it doesn't seem to work at all.

Add a Comment