#Can't get CharacterBody3D to collide with RigidBody3D and RigidBody3D to not react

1 messages · Page 1 of 1 (latest)

stoic jetty
#

I'm working on a project in Godot 4.3, and I want my rigid bodies to ignore the player, but the player to collide with the rigid bodies. I have the player set to mask the layer the rigid bodes are on, and the rigid bodies set to not mask player, but the rigid bodies still react anyway and tend to send the player flying off at high speed and often the rigid body clipping into the floor? If I set them to not mask each other at all then, as expected, they don't interact at all, but I can't get only the rigid bodies to ignore the player. I can't tell if this is a bug or if I'm missing something.

Edit: My image captions didn't stick for some reason.First image is the collisions of my character, second is the rigid body.

frigid veldt
#

Can you explain which layer is which (player, rigid body) and which image is which?

bleak shard
#

So if your rigid body is trying to ignore your player, that means as it moves it will clip into the player, which will cause the player to do weird things when it tries to move. The player going flying is likely due to some code in your player script

jolly flower
# stoic jetty I'm working on a project in Godot 4.3, and I want my rigid bodies to ignore the ...

I guess you could put it this way:
A solid collision always involves 2 bodies and they're interchangeable. Either you'll have collision or you won't.
You cannot say one should collide with the other, but the other shouldn't with the first.

As mentioned above this will lead to weird behavior: You have an RB clipping through the player, but as soon as you try to move the player it has a body stuck inside that it should collide with. You gotta ask yourself what's the behavior you are expecting here? Because the physics engine will by default try to depenetrate this collision overlap by any means necessary. The deeper the overlap the more violent the depenetration will be, potentially sending objects flying..