How organize the structure with CharacterBody2D and Area2D
Asked Answered
A

1

1

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).

Abradant answered 2/12, 2023 at 17:48 Comment(0)
A
0

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

Abradant answered 2/12, 2023 at 18:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.