DragAlongSurface Script moves object back to initial position after drag is finished

71 Views Asked by At

Currently, I have a Plane with Layer "Surface" and DragAlongSurface Script Attached. I have the table gameobject from the example and it also the surface controller attached to it. When I try to move the object, it moves to the desired location but comes back to its initial position after the drag is over. Please suggest a way to make object stay at the final position.

1

There are 1 best solutions below

0
On

It seems like you have things swapped. You'll want XRSurfaceController attached to the Plane (which should be on the "Surface" layer). DragAlongSurface should be attached to the object you wish to drag around (the table, which should NOT be on the "surface" layer).