Hi all,
I am new in VR/unity and want to develop a simple VR app. Hope to get some suggestions from this forum to avoid future problems. I want to import a set of human organs and view them in a VR environment (Valve Index and Unity). I hope to drag each organ (already processed in Blender therefore is separate CAD file) out and closely observe them with a headset on (holding the model with a controller, move around and rotate), then return it to its original place. Right now I am using a Pickup and Drop method (
), but since the organs are close to each other (a picture is attached), I couldn’t use box colliders as the organs conflict and bounce to everywhere. It worked when I leave only one organ in the scene. I tried mesh collider but couldn’t pick up any organ. I am not sure if there is a better method (instead of pickup) can be used in this case, or anything wrong when I define the colliders. I saw many videos using mouse to move/rotate models on a screen, but I need to use a controller and headset. Also I would like to know if there is a way to return the organs to their original spots automatically.
Thanks a lot for your time and help.
James
The problem with non-convex mesh colliders is they aren’t supported for non-kinematic rigibodies - you could either check ‘convex’ on the mesh collider component and see if that is good enough, or create your own ‘compound’ collider (a group of primitive colliders [sphere/box] arranged to build up the shape of something more complex)
Thank you adamjweaver for the response. I changed to convex mesh and also checked Iskinematic on the model’s rigidbody. Now I can pick up a model but it drops immediately to a certain distance (see the attached video). But I need to hold the model then view from different angle. Maybe the scripts (attached as well) have something wrong? Another issue is that the pickup is not sensitive, I may succeed once after pulling the trigger couple times, guess some parameters may be set inappropriately?
Thanks again,
5131109–507230–hand.cs (2.88 KB)
5131109–507233–Interactable.cs (257 Bytes)
5131109–507236–clip0010.zip (415 KB)
I set both controllers and objects IsKinematic, I guess that make the following script in Hand.cs questionable, any thoughts?
m_CurrentInteractable.transform.position = transform.position;
Rigidbody targetBody = m_CurrentInteractable.GetComponent();
m_Joint.connectedBody = targetBody;