1

I'm trying to make a 3D game in Swift. I want my enemy to follow a path using a GKGoal. The GKAgent3D has a rotation property type matrix_float3x3, but the SCNNode's rotation property is type SCNVector4.

How can I convert matrix_float3x3 to SCNVector4 using simple swift?

I already search the web, but there is almost none documentation about using GameplayKit with SceneKit, or the GKAgent3D.

I found some math documentation and functions for matrix rotations and angles (for example: Decomposing and composing a 3×3 rotation matrix), but this returns me the XYZ angles for a SNVector3, not SNVector4.

Pinkie Swirl
  • 2,375
  • 1
  • 20
  • 25
Cael
  • 11
  • 2
  • You need no greetings (and excuse your English), see https://meta.stackexchange.com/questions/2950/should-hi-thanks-taglines-and-salutations-be-removed-from-posts – Pinkie Swirl Oct 05 '16 at 02:19
  • See the answers to this question: https://stackoverflow.com/questions/42635578/converting-matrix-float3x3-rotation-to-scenekit/46373613#46373613 – OliverD Sep 22 '17 at 21:46

0 Answers0