Reputation: 141
when I make a cube in blender and set it as Active, then export to collada, in SceneKit this object still hasn't a physics body, I have to make it on my own by node.physicsBody = [SCNPhysicsBody dynamicBody]; but SceneKit doesn't respect my settings in blender, for example when I set a collision shape as a sphere shape in SceneKit it is still a box Shape. But even than I got a warning "SceneKit: warning, Non triangle list element type not yet supported in physics shape generation"
Thanks for any help :)
Upvotes: 3
Views: 792
Reputation: 126107
SceneKit's physics system doesn't directly map to the one in the Collada spec, so it doesn't import physics features defined in a DAE file. (Also, the physics features in Blender might not all export to DAE.)
When setting up physics in SceneKit, you should set both the physics body's type (which you did by creating it with dynamicBody
) and collision shape (the physicsShape
property). If you don't set the latter, SceneKit tries to generate one from the mesh — this is more expensive and doesn't work for all meshes, as you've seen. Instead, create an SCNPhysicsShape
from one of the basic geometries (like SCNSphere
).
Upvotes: 6
Reputation: 141
OK, now I know... New Blender doesn't support physics export anymore (it used to support).
Upvotes: 0