Camera with Rotation and Pitch mouse control

Here is a demo showing one of the many ways to achieve a 3d-person-like camera control using only logic nodes in the Armory3D game engine. I’ve used the torus to help show the pivot points for the camera. Ideally one can use an empty for each of the pivot points in a final project, so that you don’t have an unsightly donut in your game, unless that’s your thing.

[[Use your right mouse button to rotate the camera]]

The parent chain is a bit interesting, but in the end it achieves the look and feel that I wanted. The blue torus is at the root of the parent tree. Suzanne (the monkey head) and the red torus are children of the blue torus. The camera is then parented to the red torus. The real chain to pay attention to is in the: Blue Torus > Red Torus > Camera. The player model is just there for the game/player.

There are only two logic scripts used, one is the x-axis which is responsible for the pitch of the camera, and the other is for the y-axis which is responsible for’pivoting’ or rotating. Each script is then applied to their respective pivot node, in this example I’ve been using the torus mesh in these examples to represent those nodes.

Rotate-X

Rotate-Y

These logic node ‘scripts’ are then added as an Armory trait to their respective object.

Be the first to comment

Leave a Reply

Your email address will not be published.