Skip to content

Prepare Colliders on the edges of the main screen #11

@alienboy13

Description

@alienboy13

There must be colliders on the edge of the screen to connect to the behavior of the ball. The top, left, and right of the screen must be bordered with simple box colliders so the Ball bounces off, and the bottom of the screen must be bounded with a box collider that detects when the ball reaches the bottom and resets the level

  • Create a "Bounce Collider" GameObject with a "BounceCollider" script.
  • Attach a BoxCollider2D component to the BounceCollider GameObject, making sure the box next to "isTrigger" is not checked
  • Make the "Bounce Collider" GameObject a prefab
  • Create a "Death Collider" GameObject with a "DeathCollider" script
  • Attach a BoxCollider2D component to the DeathCollider GameObject, making sure the box next to "isTrigger" is checked
  • Make the "Death Collider" GameObject a prefab
  • Border the top and sides of the screen with appropriately sized BounceColliders
  • Border the bottom of the screen with an appropriately sized DeathCollider

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions