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

Yaw() public method

Overridden to apply fixed yaw axis behavior.
public Yaw ( float degrees ) : void
degrees float
return void
		public override void Yaw( float degrees )
		{
			Vector3 yAxis;

			if ( isYawFixed )
			{
				// Rotate around fixed yaw axis
				yAxis = yawFixedAxis;
			}
			else
			{
				// Rotate around local Y axis
				yAxis = orientation * Vector3.UnitY;
			}

			Rotate( yAxis, degrees );
		}

Usage Example

Beispiel #1
0
		public void CreateScene()
		{
			_entity = _root.SceneManager.CreateEntity("BasicCube", PrefabEntity.Cube);
			_entity.MaterialName = "Examples/TestImage";
			
			_sceneNode = Root.Instance.SceneManager.RootSceneNode.CreateChildSceneNode();
			_sceneNode.Position = new Vector3(150, 0, -300);
			_sceneNode.AttachObject(_entity);
			_sceneNode.Yaw(45);
		}