Update() public method

public Update ( ) : void
return void
Beispiel #1
0
        public override void UpdateBeforeSimulation()
        {
            MainCamera.Update();
            MyEntities.UpdateBeforeSimulation();

            base.UpdateBeforeSimulation();
        }
Beispiel #2
0
        public override void UpdateBeforeSimulation()
        {
            if (MainCamera != null)
            {
                MainCamera.Update(VRage.Game.MyEngineConstants.UPDATE_STEP_SIZE_IN_SECONDS);
            }

            MyEntities.UpdateBeforeSimulation();

            base.UpdateBeforeSimulation();
        }
    void FixedUpdate()
    {
        currentVelocityDir        = Vector3.Lerp(prevVelocity, target.root.GetComponent <Rigidbody>().velocity, fVelocityDamping * Time.deltaTime);
        currentVelocity_carAxis.x = Vector3.Dot(currentVelocityDir, target.forward);
        currentVelocity_carAxis.y = Vector3.Dot(currentVelocityDir, target.up);
        currentVelocity_carAxis.z = Vector3.Dot(currentVelocityDir, target.right);

        //////////////////////////////////////////////////////////////////////////////////////////////////////
        /// Do something start from here

        mainCamera.Update();

        /// End
        //////////////////////////////////////////////////////////////////////////////////////////////////////
        prevVelocity = currentVelocityDir;
    }