Godot Tutorial: Collision Detection

More notes from doing tutorial of this video series. Assets from Game Endeavor

I now have collision detection working. As well players will disappear when walking behind large objects such as trees. Oh have a camera the moves with the player now too!

Use Arrow Keys to move. Will not work on the phone.

Some notes of things I’d like to remember…

  • Only these types of nodes needed Y Sort Enabled:
  • The Player “class” scene does not need Y Sort Enabled, only the Instanced Child Scene of Player needs it.
  • Do not use a Tilemap as the parent of TileMapLayers, use Node2d. Tilemap is a Node and they do not have relative transform to their parent. Godot renders all nodes with transform first then Nodes and children without transform. This was causing my Player to render underneath the background giving me lots of grief that Z Index could not solve when attempting Y Sort (Z Index allowed me to see the player but then Y Sort would not work).


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *