Hi I’m fairly new to ThreeJS and also react three fiber. I’m trying to make an animated glb model move away from my mouse (i.e. bird flies away) when the mouse gets near the object then have the model return to its initial location once the mouse has left the vicinity. How would I go about doing this?
An explanation towards react three fiber is preferable, but I’m fine with ThreeJS if preferred!
No problem, I forgot to mention, I think you mentioned React. I would store the original object to state using an array so you can move it back to the original position. There are methods for this in the Object3D class. If you are new to Three.js I would recommend this class. Its really good and very fun