protected override void SimulatePhysics() { KinematicCharacterSystem.PreSimulationInterpolationUpdate(Time.fixedDeltaTime); KinematicCharacterSystem.Simulate(Time.fixedDeltaTime, KinematicCharacterSystem.CharacterMotors, KinematicCharacterSystem.PhysicsMovers); KinematicCharacterSystem.PostSimulationInterpolationUpdate(Time.fixedDeltaTime); base.SimulatePhysics(); }
private void Start() { KinematicCharacterSystem.EnsureCreation(); CountField.text = SpawnCount.ToString(); UpdateOnImages(); KinematicCharacterSystem.Settings.AutoSimulation = false; KinematicCharacterSystem.Settings.Interpolate = false; }
public void Initialize(int maxCharacters) { // Set up for manual control over simulation KinematicCharacterSystem.EnsureCreation(); KinematicCharacterSystem.AutoSimulation = false; KinematicCharacterSystem.InterpolationMethod = CharacterSystemInterpolationMethod.None; Characters = new Dictionary <int, MyCharacterController>(maxCharacters); }
public override void Move(Vector3 dist, float deltaTime = 0) { _motor.CharacterController.SetVec(dist / deltaTime); KinematicCharacterSystem.FlySimulate(deltaTime, _motor); }
public override KeyValuePair <float, float> GetRotateBound(Quaternion prevRot, Vector3 prevPos, int frameInterval) { SetCharacterRotation(prevRot); SetCharacterPosition(prevPos); return(KinematicCharacterSystem.MyCalcRotateBound(_motor, frameInterval)); }
private void Start() { KinematicCharacterSystem.EnsureCreation(); CountField.text = SpawnCount.ToString(); UpdateOnImages(); }
private void Update() { KinematicCharacterSystem.Simulate(Time.deltaTime, KinematicCharacterSystem.CharacterMotors, KinematicCharacterSystem.PhysicsMovers); }
public void OnSimulateStep(float deltaTime) { KinematicCharacterSystem.Simulate(deltaTime); }