Esempio n. 1
0
func (self *Transform) processRotation(deltaT float32, component *components.Transform) {
	rotateDir := component.RotateDir().Times(component.RotationSpeed).Scale(deltaT)

	if rotateDir.X != 0 {
		component.CurrentPitch += rotateDir.X
	}

	if rotateDir.Y != 0 {
		component.CurrentYaw += rotateDir.Y
	}

	if rotateDir.Z != 0 {
		component.CurrentRoll += rotateDir.Z
	}

	component.RecalculateCurrentRotation()
}