This component takes input from a standard gamepad using joystickCHOP and spits out an XZ position, yaw, pitch, jump, and a FOV value. It features individual horizontal and vertical sensitivity, a movement speed / dash / jump multiplier, FOV shifting, and a zoom action with adjustable FOV multiplier.
Very useful if you have a gamepad and want to view/navigate your creations more intuitively. It only supports movement on a fixed XZ plane, so no collisions or flying. Yet.
Possible future improvements:
- Cinematic mode - using lag and filters to smooth out movement.
- Physics mode - collision detection and jumping/bouncing.
- Descent mode - a 6DOF mode inspired by the classic action game.
- PIDs integration - a control mechanism allowing for more responsive, fluid and customizable aim controls. Inspired by drone controllers.
- Exponential aim rates - allows for more precision at lower aim values, and faster turning at high aim values.
- Connect all 3 outputs of the tox to a merge CHOP to readily access the values.
- Reference posx, posz, pitch, and yaw in your camera COMP as tx, tz, rx, and ry respectively. Alternatively, reference these in a null COMP and constrain/parent that to your camera. This allows for easy adjustment of "eye height" in the camera's Y-translate parameter. Make sure to reference this eye height in your Y pivot so you don't faceplant the floor when you look down :)
- Reference the FOV value in your camera's view tab, and the jump value in your Y-translate.
- Try moving around! Hit RESET to reset the speed CHOPs inside if it's acting weird.
- Left stick -- move around
- Right stick -- look around
- Xbox (A) / PS (X) -- jump
- Left bumper - dash/sprint
- Right bumper -- zoom in
- Left/right triggers -- increase/decrease field-of-view
The sensitivity values and FOV shift rate are in degrees/sec.
Run speed is in units/sec.
The zoom button scales your FOV to a multiple of its current value, defined by the Zoom Multiplier parameter.
As always find me on the TD discord for bug reports and suggestions!