Hi,
I would like to build a scene where there would be multiple persons walking to certain points, then playing some animations (sitting down, laying down, doing other stuff), then standing up again, walking somewhere else etc etc.
In more technical terms, this could be described as a dynamic state machine, where the states can be switched between Person atoms and triggered while the persons are at arbitrary coordinates in the scene.
How would i best go with this? I have no problem with programming, so i can build the state machine logic as a c# script, however i have encountered some issues with animations. I have downloaded various scenes where person atoms are walking and seen how it's done there, but for this use case there are short commings.
Most of the scenes use the Timeline plugin. The movement across the scene is however made by moving the individual controllers (hear, arms, legs, ...) in the absolute global scene space (not relative to the root controller). The root controller stays at the spawn point the entire time. Here i see following shortcomings:
- Can't tell where the person actually is. Or, i could by getting the position of individual controllers (like headControl), but what's more important:
- This isn't at all reusable. The animations are super tied to that particular atom and point in time. I can't reuse them anywhere else, or at any other time (when the person's absolute position in the scene is different)
- When the person's position is different than its root controller's position, i can't use any poses (if i want to create custom animations between poses i downloaded from the hub) because applying the pose centers the person back to its root controller, which looks like teleporting.
I tried using CLS https://hub.virtamate.com/resources/cls-2-demo-character-controller.20823/ and for walking it looks good, but it manipulates the root controller in a way in which i can't apply further poses to it (sticks the Y coordinate of the root to the ground; but yay, at least it moves the root together with the person) and also i can't use timeline animations for other poses because i would want to trigger them from any point in the scene (and possibly rotation of the person).
Or am i missing something and what i described can be actually easily done?
I would like to build a scene where there would be multiple persons walking to certain points, then playing some animations (sitting down, laying down, doing other stuff), then standing up again, walking somewhere else etc etc.
In more technical terms, this could be described as a dynamic state machine, where the states can be switched between Person atoms and triggered while the persons are at arbitrary coordinates in the scene.
How would i best go with this? I have no problem with programming, so i can build the state machine logic as a c# script, however i have encountered some issues with animations. I have downloaded various scenes where person atoms are walking and seen how it's done there, but for this use case there are short commings.
Most of the scenes use the Timeline plugin. The movement across the scene is however made by moving the individual controllers (hear, arms, legs, ...) in the absolute global scene space (not relative to the root controller). The root controller stays at the spawn point the entire time. Here i see following shortcomings:
- Can't tell where the person actually is. Or, i could by getting the position of individual controllers (like headControl), but what's more important:
- This isn't at all reusable. The animations are super tied to that particular atom and point in time. I can't reuse them anywhere else, or at any other time (when the person's absolute position in the scene is different)
- When the person's position is different than its root controller's position, i can't use any poses (if i want to create custom animations between poses i downloaded from the hub) because applying the pose centers the person back to its root controller, which looks like teleporting.
I tried using CLS https://hub.virtamate.com/resources/cls-2-demo-character-controller.20823/ and for walking it looks good, but it manipulates the root controller in a way in which i can't apply further poses to it (sticks the Y coordinate of the root to the ground; but yay, at least it moves the root together with the person) and also i can't use timeline animations for other poses because i would want to trigger them from any point in the scene (and possibly rotation of the person).
Or am i missing something and what i described can be actually easily done?