Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Detected collisions in SFML between Sprite and Tile map  (Read 1662 times)

0 Members and 1 Guest are viewing this topic.

fier

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Detected collisions in SFML between Sprite and Tile map
« on: March 06, 2015, 12:11:33 pm »
Hello. How to create/define a collision between Sprite of character and Tile of map in SFML libriary? I want my player to be able to recognise when he hits the wall.

Ztormi

  • Jr. Member
  • **
  • Posts: 71
  • Web developer by day. Game developer by night.
    • View Profile
Re: Detected collisions in SFML between Sprite and Tile map
« Reply #1 on: March 06, 2015, 12:16:06 pm »
By checking if bounding box of a player intersects with bounding box of nearby tile.

fier

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Detected collisions in SFML between Sprite and Tile map
« Reply #2 on: March 06, 2015, 01:22:49 pm »
Yes i understand that but how can i make bounding box to exactly one tile from the whole map?

 

anything