I have a question about the Anim State Graph. Can I use it to animate elements and transitions / sound triggers / etc. for an animation sequence in the 3D scene?
I have a sequence where entities need to move from a to b - when they arrive, c (and probably d) fires and so on. basically its a a sequence of visual events.
I saw that the animation state graph is basically designed for character/3D model animation states. But I would like to know if I could also animate other things like I would in (for example) Unity3D animator.
I ask because I haven’t used it before. I’d have to try it - but would like to ask if it’s feasible - or if I should think about other options.
It is not feasable. The anim state graph is used to control and blend the animations of the skinned meshes, which came from your imported models. It is not suitable for moving normal entities. For that you would need to move them with a script, or some animation framework, like Theatre.js.
thanks for your answers. Hmm thats challenging, because i have some kind of animation orders. For example: Object a moves to b, then blends out, another element blends in, sound or next action happens. its some kind of sequence for different things which happens in the scene, the user can look at.
Would have been easy done with some kind of animator like i used to know in unity3d, so i hoped i have some kind of similar option in playcanvas. dont know if you can achive smooth transitions via script too but i have no other option except trying it out.
Thank you! I’ll take a look into it. One Question in advance: Is this mobile friendly? The application im developing is targeting mobile devices (iOS / Android) do you have some experience using this library?
I also tried the PlayCanvas Theatre.js Example but i have to admit, that im a bit confused in terms of the usability. Yet i could not figure out how to add other transform properties like opacity into it (i could add it into the example.js script and make it visible in the porperties window but not in the animation window below).
If i get it right the idea is, that the example.js script just creates the posability to create anims during runtime and export them as .json file i would have to load and play animations from later on?
Its like you would have to customize each animation for each entity seperately for each sequence with its own specific script right (some kind of diy animator )? Could be a bit difficult in terms of creating sequences i guess
hi together, i have a short (syntax) question:
So i tried out the script mentioned by LeXXik, which basically works, but for opacity i have a problem i cant figure out. The template is coded for element components, but i’m working with model / render components, so the syntax is slightly differend.
You would have to take a look into the project (LeXXik’s link to the timeline script) to understand it a bit better but i try to explain the relevant problem below.
In the template (line 338) he coded a tween function fo the opacity with:
Note: i also tried to access the opacity channel by: this.entity.render.meshInstances.getParameter("material_opacity");
but none of them seems to work. I also have no errors within the console. Do you know why this is not working or whats the misstake?
If im accessing the material of the meshInstance, the opacity parameter should be correct if im right.