I can’t get animations in SceneKit work correct. I’d like to build a beautiful game in 3D but I get stuck with a very simple and basic thing like animation :-(
I saw WWDC 2015 session 606 and was very impressed and start to build my game using sample code from Fox project (https://developer.apple.com/library/ios/samplecode/Fox/Introduction/Intro.html).
Steps I’ve made:
- created a cube in 3d tool (Cheetah 3d) and export it in cube.dae
- create skeletal animation (just a simple rotation) for cube and export only skeleton without mesh in cubeAnimation.dae
- copy cube.dae and cubeAnimation.dae into Xcode project and convert them in cube.scn and cubeAnimation.scn
- using Apple sample code (Fox project from WWDC 2015 session 606) add cube.scn on a scene 5. using Apple sample code (Fox project from WWDC 2015 session 606) add cubeAnimation.scn animation to cube.scn
- build and run project ––> cube.scn is rotating BUT cube.scn resets it’s initial position to one that is in cubeAnimation.scn
Thinking that my 3d tool (Cheetah 3d) export in Collada with some issues I’ve tried to use models created by other developers but result was the same. I’ve tried to use Autodesk Maya to export animations but result was the same. I even tried to use model from Unreal Engine example (https://wiki.unrealengine.com/File:ThirdPerson_FBX.zip) but result was the same.
I put Xcode project source here https://www.dropbox.com/s/8vtmem4jqnetmwd/XcodeProject.zip?dl=0 I put models and animations source here https://www.dropbox.com/s/qkkbfhk7wrz4r4z/ModelsAndAnimations.zip?dl=0
Maybe there are some special Collada export settings to make animations work correct?