public override Camera GetCameraForObject(SceneARWorldObject worldObj) { SceneWorldObjectState state = null; if (m_sceneObjects.TryGetValue(worldObj, out state)) { if (state.IsTracking) { return(VuforiaWorld.Instance.WorldCamera); } } return(base.GetCameraForObject(worldObj)); }
protected virtual void SetPosition(SceneWorldObjectState state, Vector3 worldDelta) { if (!state.IsSpawned) { SpawnObject(state.WorldObject, WorldCamera, WorldAnchor.transform); state.IsSpawned = true; } else { state.WorldObject.GameObject.transform.Translate(-worldDelta, Space.World); if (state.WorldObject.Options != null) { ApplyOptions(state.WorldObject.GameObject.transform, GetCameraForObject(state.WorldObject), state.WorldObject.Options); } } }