M. Houghton
M. Houghton

Reputation: 85

SceneKit transform/rotate object

I want to create an app using SceneKit with a solid 3D object, whose shape I can change using a given user input. Is it better to do this with predefined animations or to make lots of smaller objects (as nodes) and change their arrangements to mimic a single object changing shape? Many thanks!

Upvotes: 1

Views: 546

Answers (1)

Ef Dot
Ef Dot

Reputation: 768

Depending on what you mean by 'change shape' you have following options:

  1. If your object is simple (ex: SCNBox, SCNCone, SCNCylinder and alike) and you can change its shape the way you want using its animatable properties (ex: chamfer radius of SCNBox), then animations is simpliest way to go.
  2. If your object is SCNNode with contents loaded from external source and by change its shape you mean scale/rotate/translate, you can also use animations.
  3. If you can create complex object using graph of simple objects with acceptable performance and you can achieve desired shape change with animatable properties then you can also use animations.
  4. If your object is complex (for example, based on some mathematical model) and/or performance is main prioprity for you, then the only way to go with SceneKit is constructing custom SCNGeometries (by filling SCNGeometrySource/SCGeometryElement) from your model.

Since question have tag blender and title mentions rotate, then perhaps (2) is best for you.

Upvotes: 1

Related Questions