Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public void EnableContactThenUpdate()
        {
            INTERACTION_SCENE_INFO info = new INTERACTION_SCENE_INFO();

            info.sceneFlags = SceneInfoFlags.ContactEnabled;

            InteractionC.UpdateSceneInfo(ref _scene, ref info);

            UpdateInstance();
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        /// 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;
        }