Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
Detected collisions in SFML between Sprite and Tile map
Print
Pages: [
1
]
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
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.
Logged
Ztormi
Jr. Member
Posts: 71
Web developer by day. Game developer by night.
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.
Logged
fier
Newbie
Posts: 2
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?
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
Detected collisions in SFML between Sprite and Tile map
anything