[sharing] Easy first person control for camera and objects in "view space" with gamepad or keyboard

TFL's icon

From the beginning of my Max journey I've always been a bit frustrated by [jit.anim.drive], and more generally by the process of manually moving objects in 3D space.

A year ago I started working on something to get this task easier. I slept on it for about 9 months but got back to it recently, and I came up with two objects:

  • [gamepad.drive] a simple abstraction that takes the output of a [gamepad] and converts it to move and turn messages in a typical jit.anim fashion. Left stick to move around, right stick to rotate, triggers to move up/down, featuring scaled radial deadzones for your quirky always-shifting Xbox sticks.

  • [tc.fpcontrol] (sorry for that name): a v8 object that:

    • takes as input move and turn messages, like the ones from [gamepad.drive], but also [jit.anim.drive] (with a small trick), or any other custom source

    • for controlling objects in camera space: if you move the left stick to the right, your object will go to the right of the screen, regardless of its orientation or the position of the camera. Like what you're generally used to in video games. You can always switch to a more classic object space mode where movements are applied relatively to the objects orientation.

    • for controlling cameras, either at the same elevation (use triggers to move up/down), either in "flymode" (goes forward in the direction you're pointing to, without elevation lock)

    • for controlling [jit.anim.node], either single ones, or within a hierarchy, allowing to control multiple objects at once.

    • featuring a customizable bounding box indicating the target object/jit.anim.node

    • gives you a list of all controllable objects in your patch. You can populate a menu from that and easily cycle through every object/anim.node to control them one by one.

Probably not the best demo video, but hopefully it gives an idea


It comes in the form of a small package that you can download from its github page.

It is still very much a work in progress. [jit.anim.node] is so deep that there is surely many scenarios where [tc.fpcontrol] might not work as expected. Use at your own risk.

Feedbacks and suggestions more than welcome!