public void UpdateSceneInfo() { INTERACTION_SCENE_INFO info = new INTERACTION_SCENE_INFO(); info.gravity = Vector3.one.ToCVector(); info.sceneFlags = SceneInfoFlags.HasGravity; InteractionC.UpdateSceneInfo(ref _scene, ref info); }
public void EnableContactThenUpdate() { INTERACTION_SCENE_INFO info = new INTERACTION_SCENE_INFO(); info.sceneFlags = SceneInfoFlags.ContactEnabled; InteractionC.UpdateSceneInfo(ref _scene, ref info); UpdateInstance(); }
public virtual void Setup() { InteractionC.CreateScene(ref _scene); INTERACTION_SCENE_INFO sceneInfo = new INTERACTION_SCENE_INFO(); sceneInfo.sceneFlags = SceneInfoFlags.ContactEnabled; InteractionC.UpdateSceneInfo(ref _scene, ref sceneInfo); }
/// Force an update of the internal scene info. This should be called if gravity has changed. /// </summary> public void UpdateSceneInfo() { if (!_hasSceneBeenCreated) { return; // UpdateSceneInfo is a side effect of a lot of changes. } INTERACTION_SCENE_INFO info = getSceneInfo(); if (_graspingEnabled && !_enableGraspingLast) { using (LdatLoader.LoadLdat(ref info, _ldatPath)) { InteractionC.UpdateSceneInfo(ref _scene, ref info); } } else { InteractionC.UpdateSceneInfo(ref _scene, ref info); } _enableGraspingLast = _graspingEnabled; _cachedSimulationScale = _leapProvider.transform.lossyScale.x; _activityManager.OverlapRadius = _activationRadius * _cachedSimulationScale; }