Godot Version
4.4.stable
Question
I’ve been trying to convert my NPCs from using CharacterBody3D Nodes to Rigidbody3D for performance reasons (move_and_slide overhead with multiple entities). I’m using the same calculations for the desired velocity for both the CharacterBody3D and the Rigidbody3D, just changed how it’s applied to the NPC (apply_force/setting linear_velocity vs move_and_slide).
For some reason, using the Rigidbody3D makes the movement slower and inconsistent. I already change linear damping mode to Replace and made the global damping 0.0. Rigidbody’s mass is the minimum value, no Physics material with friction, gravity scale is 0.0, tried with both apply_force, apply_impulse, setting the linear_velocity, tried multiple values and they either move too slowly, or at breakneck speeds that eventually crash the game.
RigidBody3D.linear_velocity = desired_velocity
CharacterBody3D.velocity = desired_velocity and then CharacterBody3D.move_and_slide()