Axiom.Samples.CharacterSample.SinbadCharacterController.UpdateCamera C# (CSharp) Метод

UpdateCamera() приватный Метод

private UpdateCamera ( Real deltaTime ) : void
deltaTime Real
Результат void
		private void UpdateCamera( Real deltaTime )
		{
			// place the camera pivot roughly at the character's shoulder
			cameraPivot.Position = bodyNode.Position + Vector3.UnitY * CamHeight;
			// move the camera smoothly to the goal
			Vector3 goalOffset = cameraGoal.DerivedPosition - cameraNode.Position;
			cameraNode.Translate( goalOffset * deltaTime * 9.0f );
			// always look at the pivot
			cameraNode.LookAt( cameraPivot.DerivedPosition, TransformSpace.World );
		}