- Home /
Objects passing through each other using openni
Hey all,
I have been working with using the kinect in unity using the openni package. The objects I have attached to my hands are passing through other objects, including themselves, but not all the way. There is still interaction between the objects. For example, if I have a box sitting there and gloves attached to my hands, the box would move from contact, but the gloves would pass into the box past where the colliders should be. This happens whether I move quickly or slowly. I have rigidbodies put on all the objects in addition to a collider for each object. All tracking of myself as the user is correct too. Anyone else having this problem?
Note: This does not happen when I do other scenes which do not use the kinect or openni.
Answer by DaveA · Nov 10, 2011 at 08:14 PM
My guess is you're using OpenNI to set the absolute world position of the gloves? Like transform.position = openNIHandPos; or something, right? If so, things will just go where you put them. Maybe would either need to impel them to move in a direction that the hand is moving, letting the MoveTo types of routines detect collisions, or test for collision yourself (in an Update function or where ever you are setting glove positions. Otherwise, you might just pop it right into the middle of something and get the OnCollision in the frame after that.
Your answer
![](https://koobas.hobune.stream/wayback/20220613040802im_/https://answers.unity.com/themes/thub/images/avi.jpg)