Reputation: 1
In my VR game, I am using the SteamVR laser pointer to pick up objects (photos placed on a table) and drop them at specific locations. These objects can be picked up again and dropped elsewhere.
I’ve implemented the drag and drop interaction already. I parent the object (photo) to the hand (a GameObject with the SteamVR Hand and SteamVR Laser Pointer script), and it works fine. However, when I try to add colliders to the table to prevent the object from passing through it (so that the photo doesn’t go through the table like in real life), I have a problem. While the photo itself doesn’t pass through the table, the laser pointer still does. I checked the “Add Rigidbody” boolean on the SteamVR Laser Pointer script, but it makes the laser pointer go in weird directions and performs collisions unnecessarily (breaks the entire drag and drop interaction too). How can I make sure that once an object is picked up, the laser pointer stays locked onto the photo’s center and doesn’t move from it until the object is dropped (when the pointer is released)? I’ve been stuck on this problem for quite a bit, any help is appreciated.
Upvotes: 0
Views: 21