The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

+1 vote

I want to make a Character body collide with rigid bodies but that isn't working probably, I used this code that I found after the move_and_slide() method:

for col_idx in get_slide_collision_count():
    var col := get_slide_collision(col_idx)
    if col.get_collider() is RigidBody2D:
        col.get_collider().apply_central_impulse(-col.get_normal() * 0.3)
        col.get_collider().apply_impulse(-col.get_normal() * 0.01, col.get_position())

if it's not possible to achieve perfect collisions with a character body, then what is the fastest way to transform a character body to a rigid body, with movement ability, of course?

Godot version v4.0.2.stable.official [7a0977ce2]
in Engine by (20 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.