|
|
|
 |
Reply From: |
DamonR |
Hi,
There is a section on the state machine in the godot 3.1 docs; AnimationTree — Godot Engine (3.1) documentation in English
I haven’t used it myself, I still use the old animationtreeplayer mode as my projects were imported from an older version (but plan to learn the new one soon, as animatikntreeplayer is deprecated).
I think there have been links in other answers to similar questions about state machine logic and says to use it (such as Finite-State Machines: Theory and Implementation | Envato Tuts+ ). I use a kind of scripted state machine for some enemies in my main project (started for learning godot and playing around,
GitHub - DamonRaziel/Project-Bob-s-Quest: Project Bob's Quest was built to test my abilities and see what I could learn. It is still a work in progress, and can be used as a base for various mechanics. ), where each set of instructions for behavior and animations is set by a state number which gets changed according to changes in the scene.
I’m not sure about set frame, as my models have separate animations. Collada (.dae) files do support multiple animations on import. You need to separate them in the 3d animation software you use.
Which 3d modelling and animation software do you use?
I use Blender 3d for my modelling and animation, which uses actions to separate different animations ;
https://docs.blender.org/manual/en/latest/editors/dope_sheet/action.html
Each action in blender is one animation.
If you use blender, download the godot better collada exporter (available from their website), and make sure you have the “export all animations” and “all actions” options selected when exporting.
Hope this helps a bit.
I am not sure about blender 2.8, I am currently still using 2.79, but I will test 2.8 later.
It may be that something has changed in the newer versions of the exporter.
I downloaded it from the Godot downloads page last year, and have used those older downloaded files when updating my blender add-ons.
I will check for any differences between my downloaded files and the ones on github.
DamonR | 2019-08-12 21:24
I tried this with blender2.8.
However, I get an error in my environment.
how to divide one animation to multiple part with godot editor?
Add-ons often have errors
I tried the old way of adding the better collada exporter last night to 2.8, but was unable to get it to work (2.8 is rather different to 2.79, some good ways, some will need adjusting to).
I will try the exporter from github soon.
I don’t know of any way to split animations once they are in godot, as direct bone manipulation is not able yet.
DamonR | 2019-08-13 20:25
I have tried the updated collada exporter and godot scene editor for blender 2.8, but have been unable to get either working properly.
I reinstalled blender 2.79 alongside 2.8, and was able to use the 2.79 collada exporter properly again. But due to 2.8 being a higher version, any files/changes made in 2.8 can’t be opened in 2.79.
So for now I will continue using 2.79 until someone manages to get the better collada exporter working properly with 2.8.
The only solution I can think of for now is to also go back to a previous version of Blender, which may be effort as you would need to rebuild your models and animations from scratch (as you can’t import them from a higher version), but at least the exporter would work properly.
It depends on whether or not you need to use the latest version of Blender, or if you can do what you’re trying to do with a previous version.
Hope this helps.
DamonR | 2019-08-13 23:12
thanks!! i return blender2.79!!