You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
CharacterBody2D colliding with a CollisionObject queued for deletion causes the project to crash
To Reproduce
Steps to reproduce the behavior:
Install Rapier Engine
Collide a CharactedBody2D with a node queued for deletion using move_and_slide()
The project crashes
Expected behavior
CharacterBody2D colliding with CollisionObject queued for deletion should not cause a crash, and does not crash with the default physics engine.
Environment (please complete the following information):
OS: Arch Linux
Version 0.6.18
Godot Version 4.2.2
Type SIMD
Example project
Open a new project using Rapier physics and insert this code into a Node2D
extends Node2D
varplat:StaticBody2Dvarbody:CharacterBody2D
# To see whats going on go to debug -> visible collision shapes on
func _ready():
# Add a character body to the scene
add_char_body()
plat =StaticBody2D.new()
plat.add_child(CollisionPolygon2D.new())add_child(plat)func add_char_body():
body =CharacterBody2D.new()varcb=RectangleShape2D.new()
cb.size =Vector2(10,10)varshape=CollisionShape2D.new()
shape.shape = cb
body.add_child(shape)
body.global_position =Vector2(150,50)add_child(body)func _physics_process(delta):body.velocity+= Vector2(0,100)* delta
body.move_and_slide() # The line that causes the crash
# Reset the platforms shape
plat.get_child(0).queue_free()varpg=CollisionPolygon2D.new()
pg.polygon =[Vector2(100,100),Vector2(200,100),Vector2(200,110),Vector2(100,110)]
plat.add_child(pg)
Description
CharacterBody2D colliding with a CollisionObject queued for deletion causes the project to crash
To Reproduce
Steps to reproduce the behavior:
move_and_slide()
Expected behavior
CharacterBody2D colliding with CollisionObject queued for deletion should not cause a crash, and does not crash with the default physics engine.
Environment (please complete the following information):
Example project
Open a new project using Rapier physics and insert this code into a Node2D
Result from running Godot from the terminal:
The text was updated successfully, but these errors were encountered: