November 29, 2022, 9:46am
I have a simple door animation. I’ve just set the origin point to the corner, animated it in Blender to open and close and then imported it into PlayCanvas.
I can see the animation file type next to the object template etc. If I click on the animation i can see the time line moving across in the top right corner, but there is no mesh there
If I open the fbx inside Windows (3D Object view), i can see the door opening and closing, so I think the animation is working
Anyone have any ideas how to get it to display inside PC?
November 29, 2022, 11:31am
Can you share the asset/project please?
In the meantime, have a look at this video to help with debugging animations:
November 29, 2022, 12:36pm
Thank you! I’ll check that out.
If you’d like to see the project it is here, and the door test is under AniTest scene PlayCanvas 3D HTML5 Game Engine
And this is the fbx i’m working with -
November 29, 2022, 1:36pm
November 29, 2022, 1:52pm
Dang, thank you! Makles a lot more sense now thank you. That video also helped show me what you did to get it to work thanks!
November 29, 2022, 1:53pm
This other video may help more covering adding the first animation:
Importing your first Model and Animation | Learn PlayCanvas
The preview not working is a bit odd, not sure what happened there tbh
November 29, 2022, 2:26pm
Thank you for the tip i’ll check that out.
I’m now onto another tutorial about triggering the door opening. Almost exactly what I was trying to do Using Anim Events and Code to control Animations - PlayCanvas Office Hours #18 - YouTube
I’ve tried to copy it exactly but I can’t for the life of me get it to work. I’m really sorry for these questions. If you get time to help that would be great.
Added the animation to the door (which plays in the game)
Made my animation events on the glb file
Made the new script and copied what was written in the video to trigger the animation to the animation events
yet the door continues to play and ignoring any of my inputs
November 29, 2022, 5:55pm
I’m wondering if I need to maybe tell PlayCanvas to run the script perhaps?
November 29, 2022, 9:58pm
Is the script door.js? If so, I can’t see it being used in the scene.
If you are new to PlayCanvas, I really recommend going through the crash course:
Crash Course - Make a Game | Learn PlayCanvas
November 30, 2022, 10:05am
Thank you! That was a huge help. I saw you need to attach the script to the door.
I actually re-watched the door animation tutorial and he also quickly adds on the script, I must have just missed it!
Anyway, huge help. I apprecaite it! The door now opens on command!