SteamVR object issue when controller is inside model

Hi,

I am trying to implement a whiteboard that you can scribble on it by picking up a marker pen. I easily managed to draw on the surface texture, the first problem I came across was that the pen would go through the whiteboard. I managed to fix this issue which is great the reason was because the script that handles the grabbing of the object would set the object to kinematic so I set that object to non kinematic when the pen tip is raycasting against the board. That seams to stop it from Google g through the board but it was not looking right so I use interpolating to make it better and smoother. The writing now looks great but I still have one crucial issue which I can not seem to get my head around. The controller still goes inside the board which is normal but the problem is that if I move the hand backward the pen still moves back of the board and the controller is still Inside the whiteboard. I want the marker pen to stay in place on the X position and move back only when the controller is out of the whiteboard. Now bear in mind I am using the latest steamVR plugin(my goal is to not use any other toolkit/plugin for this otherwise what do I learn? I know the issue is to do with the interaction script, prior to this I wrote a script that grab the object and make it throwable I extended and added the snapping feature because it was really odd trying to write on a board and your hand was upside down. The script I use is based ont the interactableexample script provided by steamVR the method used to set the camera rig and grabable seams to be very different from anything I have seen anywhere in tutorials so it is very hard to implement a specific feature within the steamVR structure. It has a script called Hand that is passed in as parameter to call overloaded method like OnHandAttach ect… Is there anyone out there that could point me to the right method with dealing with this issue is using joints a good idea? Or maybe some more complex physics?
SteamVr really lacks of documentation and it looks like it is mainly used to set up you scene and camera rig.

Any pointers on this subject would be greatly appreciated.

This topic was automatically closed after 166 days. New replies are no longer allowed.