I'm having an animated object, that can zoom, drag and rotate. What is the best way to detect its collision with other object or border? What I tried so far:
onLayout
doesn't fire on reanimated events.
useAnimatedReaction
crashes on attempts to use references (created with either useRef
or useAnimatedRef
) inside of it, thus cannot use .measure
, .measureLayout
or reanimated measure
inside of it.
useEffect
(with dependencies of zoom, rotate and drag shared values) doesn't fire until the gesture is done. Value created with useDerivedValue
doesn't help in this case either.
Here is the sample project: https://github.com/topheroes/TestReanimatedIntersection
Please advice