Godot Version
4.3
Question
I have created a simple mockup of my problem below. When my two objects collide on_body_entered is not being called.
My RigidBody2D is set up like this:
extends RigidBody2D
func _ready() -> void:
contact_monitor = true
max_contacts_reported = 25
func _on_body_entered(body: Node) -> void:
print(body, "hit me")
My CharacterBody2d is like this:
extends CharacterBody2D
var speed = 400
func _physics_process(delta: float) -> void:
if Input.is_action_pressed("up"):
velocity.y = -1
if Input.is_action_pressed("down"):
velocity.y = 1
else:
velocity.y = lerp(velocity.y, 0.0, 0.1)
move_and_collide(velocity * speed * delta)
When I ‘drive’ the character into the RB it prints nothing but the two do collide. If I turn gravity to 1 on the rigid body and ‘drop’ it on the character it does sometimes print the character name. Am I missing something obvious?