I am following one of the tile map scrolling tutorials and I've got it working but how do I make objects collide with the tiles? How can I choose which tiles can and cannot be collided with? For example, if I want the player to bounce off of tile[3] but to speed up when colliding with tile[2] and to just walk while colliding with tile[1], how would I do that? (or any/either one of those)?
I know how to Draw a ball, give it restitution and make it bounce using love.physics. But it doesn't "just work" with the tiles, so how would I do that?
I've tried learning from the code from external platformer tutorials online but haven't been able to incorporate it into my own game.
Player colliding with tiles on map?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 11
- Joined: Thu Feb 13, 2014 4:49 am
Player colliding with tiles on map?
- Attachments
-
- Tile map.love
- (2.29 KiB) Downloaded 69 times
Re: Player colliding with tiles on map?
Take a look at http://love2d.org/forums/viewtopic.php?f=5&t=77091 for an example of how to work with static rectangle tiles using love.physics.
-
- Prole
- Posts: 11
- Joined: Thu Feb 13, 2014 4:49 am
Re: Player colliding with tiles on map?
Oh dude thanks for sharing your code, it's awesome. It even answers the "how do I rotate the ball" question I wasn't going to ask lol. Much appreciated!Azhukar wrote:Take a look at http://love2d.org/forums/viewtopic.php?f=5&t=77091 for an example of how to work with static rectangle tiles using love.physics.
Who is online
Users browsing this forum: No registered users and 7 guests