LookAt rotates the node to look at the specified target position, using the specified up vector.
(target, up *math32.Vector3)
| 677 | |
| 678 | // LookAt rotates the node to look at the specified target position, using the specified up vector. |
| 679 | func (n *Node) LookAt(target, up *math32.Vector3) { |
| 680 | |
| 681 | var worldPos math32.Vector3 |
| 682 | n.WorldPosition(&worldPos) |
| 683 | var rotMat math32.Matrix4 |
| 684 | rotMat.LookAt(&worldPos, target, up) |
| 685 | n.quaternion.SetFromRotationMatrix(&rotMat) |
| 686 | n.rotNeedsUpdate = true |
| 687 | } |
| 688 | |
| 689 | // SetScale sets the scale. |
| 690 | func (n *Node) SetScale(x, y, z float32) { |
no test coverage detected