I read that the best way to make root node CharacterBody2D and it child node is Area2D. I put Sprite Sheet and Collision Shape in the root node. But if I do so, the Area2d node asks for Collision shape as well the CharacterBody2D if I moved these nodes to Area2D. (I want to make this in reason that when character collide with obstacles it make "auto jump" over it. I use move and click character control. scrolling 2d project).
How organize the structure with CharacterBody2D and Area2D
Asked Answered
It looks I found.
CharacterBody2D
----Animates sprite2d
----CollisonShape2D
-----Area2D (here set signal to CharacterBody2D)
-------->--CollisionShape2D (and here choose shape)
and left little big thing to implement in the code
© 2022 - 2024 — McMap. All rights reserved.