Axiom.Core.SceneNode.SetFixedYawAxis C# (CSharp) Method

SetFixedYawAxis() public method

Tells the node whether to yaw around it's own local Y axis or a fixed axis of choice.
This method allows you to change the yaw behavior of the node - by default, it yaws around it's own local Y axis when told to yaw with TransformSpace.Local, this makes it yaw around a fixed axis. You only really need this when you're using auto tracking (SetAutoTracking(bool), because when you're manually rotating a node you can specify the TransformSpace in which you wish to work anyway.
public SetFixedYawAxis ( bool useFixed, Vector3 fixedAxis ) : void
useFixed bool /// If true, the axis passed in the second parameter will always be the yaw axis no /// matter what the node orientation. If false, the node returns to it's default behavior. ///
fixedAxis Vector3 The axis to use if the first parameter is true.
return void
		public void SetFixedYawAxis( bool useFixed, Vector3 fixedAxis )
		{
			isYawFixed = useFixed;
			yawFixedAxis = fixedAxis;
		}

Same methods

SceneNode::SetFixedYawAxis ( bool useFixed ) : void

Usage Example

		/// <summary>
		/// 
		/// </summary>
		/// <param name="camera"></param>
		private void SetupCamera( Camera cam )
		{
			// create a pivot at roughly the character's shoulder
			cameraPivot = cam.SceneManager.RootSceneNode.CreateChildSceneNode();
			// this is where the camera should be soon, and it spins around the pivot
			cameraGoal = cameraPivot.CreateChildSceneNode( new Vector3( 0, 0, 15 ) );
			// this is where the camera actually is
			cameraNode = cam.SceneManager.RootSceneNode.CreateChildSceneNode();
			cameraNode.Position = cameraPivot.Position + cameraGoal.Position;

			cameraPivot.SetFixedYawAxis( true );
			cameraGoal.SetFixedYawAxis( true );
			cameraNode.SetFixedYawAxis( true );

			// our model is quite small, so reduce the clipping planes
			cam.Near = 0.1f;
			cam.Far = 100;
			cameraNode.AttachObject( cam );
			pivotPitch = 0;
		}
All Usage Examples Of Axiom.Core.SceneNode::SetFixedYawAxis