Raycaster issue (get back to initial position )

Hello , any one know how i can set animation when mouse and remove it when mouse leave , like in this example i want to change y position when mouse hover object and when mouse leave object the object back to position ,this is my demo https://jsfiddle.net/4zsj9b2o/15/

Try it like so: https://jsfiddle.net/w45scuen/2/

It uses GSAP to animate the objects. I’ve updated the code structure a bit so the animations are not triggered unnecessarily often.

1 Like