I have created a first iteration of the animation controller node to simplify animations.
As far as I tested it it works just like I expected. It plays an animation as long as its associated boolean is active. If none are active it returns to playing the idle (here I called it “Rest”) animation.
However there are two things about this design that bother me:
Think of an attack animation where your character moves its sword/staff/whatever in a certain way which is defined by an animation. Let’s say that an attack is triggered by a left mouse click. Normally you would click once and expect your character to attack. However using this approach the attack would immediatly stop as soon as you release the mouse button.
An extra boolean (“play whole animation on trigger”) might fix this…
Animations always start from the beginning. I noticed this when using the rotate left animation which does nothing more than rotation my player counterclockwise around the z-Axis (The rotation is purely visual and does not affect the camera): When moving left for a certain amount of time my character will for example turn halfway around to 180°. My Rest animation does not include any rotation, so releasing the key does not reset my players animation. However when I start walking left again, the keyframed animation decides that the rotation starts at 0° instantly setting the players rotation from 180° to 0°, which does not look that good…
Another note about the design: It expects inputs in exactly this order! Bool, Animation, Blend time. The script first checks if the amount of inputs is valid. However it does not check if the inputs are in correct order, it just assumes that they are.
One last thing I have noticed: Sometimes my player just disappears for a few seconds… But this also happened when using the integrated “play action” nodes, so it might be a bug in armory but I am not sure… Or I just didn’t understand how these nodes work
I also added the option for an additional modifier on the camera (for a precision mode or somthing like this, I called it “sniper” because that is what my mouse software calls this mode)
About my testing setup, it changed a little:
- My actual player is now a cylinder (you can see it in the camera controller screenshot). This cylinder is invisible in armory. It is also my rigidbody and the object I use for movement. (I use a cylinder to be able to distinguish it from the cone in the viewport)
- The Camera is still parented to the empty, however the empty is now parented to the cylinder instead of the cone.
- The cone is the object which is animated. Thus, it is not a rigidbody anymore. It is parented to the cylinder as well.
I moved the cone out a little, so one can see the parenting lines. Its center is supposed to be where the center of the cylinder is.
I also modified the appearance of the cone a little, so I could see its rotation.