TrackEntry or each animation could have a custom index or custom value.
When using in Unreal I have to compare strings ("animation name") all the time and it has a poor performance.
Pagina 1 di 1
brunogsa
1 year ago
- brunogsa
- Messaggi: 10
Mario
String comparisons are unlikely to cause performance problems, even in blueprints. Can you describe your use case in more detail? Generally, you specify an animation name when setting or adding an animation once.
1 year ago
-
Mario - Messaggi: 3274
brunogsa
String comparasion is poor performance even though one use std::strcmp because it tries to find the first ocurrence of '\0' character in string.
Unless you use string hash, but is not the case.
So... I uploaded a blueprint example. I try to "idle" the character if there is not any animation.
I do not know if there is a better way, like a state machine.
In the picture, if the animation name is "idle", it adds a new "idle" animation.
If the animation name is "run", I remove "running" from character state and add animation "idle"... and so on
Unless you use string hash, but is not the case.
So... I uploaded a blueprint example. I try to "idle" the character if there is not any animation.
I do not know if there is a better way, like a state machine.
In the picture, if the animation name is "idle", it adds a new "idle" animation.
If the animation name is "run", I remove "running" from character state and add animation "idle"... and so on
Non hai i permessi necessari per visualizzare i file allegati in questo messaggio.
1 year ago
- brunogsa
- Messaggi: 10
Mario
I'm know how string comparisons work in both C++ and blueprints and I guarantee you, that they won't be a performance issue.
Your graph looks mostly good, except that you can enable looping in the "Set Animation" node and eliminate the comparison with "idle" in the beginning of the graph.
Your graph looks mostly good, except that you can enable looping in the "Set Animation" node and eliminate the comparison with "idle" in the beginning of the graph.
1 year ago
-
Mario - Messaggi: 3274
brunogsa
@Mario Thank you for the tips.
This graph can became very complex. If it is common so it seems an opportunity to solve.
This graph can became very complex. If it is common so it seems an opportunity to solve.

1 year ago
- brunogsa
- Messaggi: 10
Mark topic unread
• Pagina 1 di 1
Torna a Runtimes
- Tutti gli orari sono UTC