Godot Version
4.7.2
Question
Hi everyone,
I’m currently trying to make a game inspired by Gun Sprint where shooting a gun uses physical recoil to make the weapon flip, fly, and jump across the level.
Right now, it feels like something is missing with the physics behavior, and it doesn’t quite match that snappy, addictive game feel. I am using a RigidBody3D for the weapon player object with custom scripting for the recoil math.
Here is my current setup from the inspector:
- Script Variables (
player.gd):Barrel Axis:(X: 1.0, Y: 0.0, Z: 0.0)Recoil Impulse:11.0Recoil Lift:9.0Recoil Spin:11.0Max Speed:15.0/Max Spin Speed:13.0- Continuous fire penalty is enabled with a
0.35streak window and 2 free shots.
- RigidBody3D Physics Settings:
-
Mass:0.9 kg -
Gravity Scale:0.9 -
Linear Damp:0.05(Combine) -
Angular Damp:2.5(Combine) -
Axis Lock:Linear Zis locked,Angular XandAngular Yare locked (allowing it to slide along X/Y and only rotate around the Z axis).The Problem:
When firing, the movement feels a bit floaty or doesn’t cleanly transition into that smooth spinning momentum. I’m applying impulses to push it backward and torques to make it flip, but it doesn’t feel tight.What I’m wondering:
- Does my Angular Damp (2.5) look too high? Could it be aggressively killing the spin momentum right after a shot?
- For a Gun Sprint clone, is it better to use
apply_central_impulse()combined withapply_torque_impulse(), or should I be applying a singleapply_impulse()offset from the center of mass to let the physics engine naturally handle both the push and the spin? - How do people usually tweak the
Inertiaproperties orCenter of Massoffset for top-heavy / front-heavy gun flipping?
Any advice on getting closer to that arcade-style snappy kinetic feeling would be highly appreciated!
-