Area 3d Doesn't detect rigidbody when freeze mode is static

Godot Version

4.3 stable

Question

im making a horror game. i have working light system that works with switches. when my enemy goes near the switch the lights flick. i added a area3d to the enemy when it detects the switch the lights will flick. the switch is a rigid body.

when i set its freeze mode to static enemy’s area didn’t detect the switch .
but when the freeze mode is kinematic area detects the switch.
freeze is enabled.

why does this happen :dotted_line_face:

From the documentation:

enum FreezeMode:
● FREEZE_MODE_STATIC = 0
Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn’t collide with other bodies along its path.
● FREEZE_MODE_KINEMATIC = 1
Kinematic body freeze mode. Similar to FREEZE_MODE_STATIC, but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated.

Where it says “doesn’t collide with other bodies”, I think the collider does not interact at all and might as well not exist. If it’s only for area detection you could add a staticbody collider to the rigidbody that only interacts with the enemy’s area.

1 Like

@snipercup Thanks for your reply. i think that will be correct :+1:

1 Like

i think its something with the jolt physics. there’s a project setting physics/jolt_3d/collisions/areas_detect_static_bodies. this is not enabled by default