Basic capsule colldier with third-person over-the-shoulder camera #1

Merged
TranquilMarmot merged 2 commits from basic-capsule-movement into main 2026-02-16 04:06:25 +00:00
Member

https://streamable.com/sp6von

  • Set up phantom-camera addon
  • Capsule collider + separation ray to go over small obstacles
  • Defaults to overhead camera, moving the mouse or right joystick left/right rotates the camera around the player
  • Movement direction is always camera-relative (not tank controls)
    • This means you can just hold forward + rotate the camera to move around if you want
  • Holding right click / left trigger will zoom into an over the shoulder camera
    • Did some nice work here to make sure that the angles match when transitioning
https://streamable.com/sp6von - Set up [phantom-camera](https://phantom-camera.dev/) addon - Capsule collider + separation ray to go over small obstacles - Defaults to overhead camera, moving the mouse or right joystick left/right rotates the camera around the player - Movement direction is always camera-relative (_not_ tank controls) - This means you can just hold forward + rotate the camera to move around if you want - Holding right click / left trigger will zoom into an over the shoulder camera - Did some nice work here to make sure that the angles match when transitioning
player/player.gd Outdated
@ -0,0 +25,4 @@
var controller_sensitivity := Vector2(2.0, 2.0)
## Sensitivity of the mouse movement
var mouse_sensitivity := 0.5
Author
Member

Big TODO here to make all of this configurable 😄

Big TODO here to make all of this configurable 😄
player/player.gd Outdated
@ -0,0 +32,4 @@
@onready var camera_x_pivot_point: Node3D = %CameraXPivotPoint
@onready var camera_spring_arm: SpringArm3D = %CameraSpringArm3D
@onready var phantom_camera: PhantomCamera3D = %PhantomCamera3D
Author
Member

We could use regular Camera3D here but... we should use phantom camera, trust me 😭

We could use regular `Camera3D` here but... we should use phantom camera, trust me 😭
player/player.gd Outdated
@ -0,0 +36,4 @@
## Given an input direction, returns a version rotated towards the camera
static func input_direction_normalized_to_camera(input_dir: Vector2, camera: Camera3D) -> Vector3:
Author
Member

Normally I have these in a static class with helper functions in it, but we can move them there later

Normally I have these in a static class with helper functions in it, but we can move them there later
@ -0,0 +1,44 @@
[remap]
Author
Member
[These textures are from some Kenney pack](https://www.kenney.nl/assets/prototype-textures)
TranquilMarmot force-pushed basic-capsule-movement from 6ce2b5882b to 9f42b5aac7 2026-02-15 21:14:57 +00:00 Compare
TranquilMarmot force-pushed basic-capsule-movement from 9f42b5aac7 to 14f2476889 2026-02-15 23:57:32 +00:00 Compare
TranquilMarmot changed target branch from main to dev 2026-02-16 00:29:57 +00:00
Owner

LGTM

LGTM
TranquilMarmot changed target branch from dev to main 2026-02-16 02:02:28 +00:00
TranquilMarmot scheduled this pull request to auto merge when all checks succeed 2026-02-16 02:03:30 +00:00
xury requested review from xury 2026-02-16 04:05:19 +00:00
xury approved these changes 2026-02-16 04:06:23 +00:00
TranquilMarmot deleted branch basic-capsule-movement 2026-02-16 04:06:26 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BUGJam/pounce-game!1
No description provided.