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.
Thank you so much for your work on this. I was trying just to get the character I placed in my version (before working with the animations) just to show up. I am hoping the new release today helps with that issue.
for the life of me i can not get the playercontrol or cameracontrol to work. i set it up the way you show and add the script to the player object but it does not work.
I did the same thing for days and had to go back and double check it before I posted the last message.
Hell I did even realize there where 2 different keyboard ones at the beginning
@zaethan - I have just started getting an error with the camera controller. I am assuming something changed in the latest update of Armory?
…\Libraries\logic_pack\Sources/armory/logicnode/CameraController.hx:83: characters 25-34 : Class<iron.math.Quat> has no field lerp
…\Libraries\logic_pack\Sources/armory/logicnode/CameraController.hx:96: characters 25-34 : Class<iron.math.Quat> has no field lerp
Your assumption is correct. The iron API seems to no longer define the lerp function as static. Thus I need to instantiate a Quat object from which I can call the lerp function.
I created a pull request for this. https://github.com/armory3d/logic_pack/pull/17
Hey there! I am new to Armory and wanted to create a simple First Person game I was able to create in BGE. When I wanted to use these custom logic bricks, when pressing start, I received and error saying Build Failed, check console. I’m working with a Mac version 10.13.5 and I wasn’t able to open up the console. Does anybody know what to do?
Nope, still doesn’t work. I’ve deleted all the ‘on keyboard’ nodes and replaced them with ‘keyboard’ nodes which have ‘state’ as an output. Get the same message just like before: