Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Godot引擎通过gd脚本
我预加载了 tscn 文件和main.add_child(item). 如何删除此RigidBody节点及其子节点(RigidBody具有子节点的节点:精灵节点和对撞机形状节点)?
main.add_child(item)
RigidBody
没有足够的信息,或者只是我无法理解,但是要删除带有子节点的节点,您只需要删除它们的父节点。
get_node("your_rigid_body").free()
或者
get_node("your_rigid_body").queue_free()
如果你想在下一帧中删除它。(我不确定第二个)