Hi, when I trying to make a character controller in godot, but when I trying to climb a rigidbody cube, the cube rotate and it's not what I want, I have a script to push rigidbody, but the cube is 10k kg, even the script wont push it. I tried other game engine, they don't have this issue. Many people suggested me to make the rigidbody static. But the mechanic I want to achieve is that the player push the cube and climb up to get to the high ground
Here is the video clip showing the problem.
And this is my push code
btw, I am using jolt physics
for i in get_slide_collision_count():
var c := get_slide_collision(i)
if c.get_collider() is RigidBody3D:
var push_dir = -c.get_normal()
var velocity_diff_in_push_dir = self.velocity.dot(push_dir) - c.get_collider().linear_velocity.dot(push_dir)
velocity_diff_in_push_dir = max(0.0, velocity_diff_in_push_dir)
const MY_APPROX_MASS_KG = 80.0
var mass_ratio = min(1.0, MY_APPROX_MASS_KG / c.get_collider().mass)
push_dir.y = 0
var push_force = mass_ratio * 5.0
c.get_collider().apply_impulse(push_dir * velocity_diff_in_push_dir * push_force, c.get_position() - c.get_collider().global_position)```