Exemple #1
0
        public void RemoveBodyFromLeap(Rigidbody rigidbody)
        {
            Body body = BodyMapper[rigidbody.gameObject];

            BodyMapper.Remove(rigidbody.gameObject);
            Scene.RemoveBody(body);
        }
        public void OnBodyRemovedCallback(Body body)
        {
            // find gameobject
            GameObject gameObject = BodyMapper.FirstOrDefault(x => x.Value.BodyId.ptr == body.BodyId.ptr).Key;

            GameObject.Destroy(gameObject);
            BodyMapper.Remove(gameObject);
        }