1
\$\begingroup\$

I have created a scene which contains Area2D, CollisionShape2D & AnimatedSprite. Then I imported that scene into a level. At this moment the player should collide with the object taking it as a obstacle. But it doesn't collide with the coin. How can I make collision work from other scene?

enter image description here

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ We need to know more about what you're using to represent the player here. Is it a KinematicBody2D? Are you using move_and_slide or move_and_collide? Or are you just setting the position based on Inputs+ moves? \$\endgroup\$
    – yumaikas
    Aug 16 '20 at 6:19
2
\$\begingroup\$

So, by default, and Area2D doesn't count as a solid object. It's used for reporting when other Area2Ds or other PhysicsBodys overlap with it.

If you want the coin to act as an obstacle, you'd want to change that to use either a RigidBody or a StaticBody.

There are scripting options to address this as well, but that's likely out of scope for this.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.