Hi,
I am trying to get collision working on a tile map using STI and bump. My "player" is colliding in some places, however the shape of the collidable section is all wrong. It is as if the collidable tiles are somehow in the wrong spot / larger than it should be. Anybody who could point me in the right direction for this issue.
If interested I have uploaded my (very short) code to github for you tocheck and run for yourselves: https://github.com/ErwinM/sti-collision
Any help is much appreciated,
Erwin
STI and collision - collision map seems offset
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: STI and collision - collision map seems offset
Hi TalliDown, welcome to the forums!
You're moving both your player and the map. You should draw your player at the centre of the screen. It doesn't make sense for the player to travel out of the screen as is possible now.
On the other hand, you're forgetting to apply the scale to the width and height of your player when drawing.
You're moving both your player and the map. You should draw your player at the centre of the screen. It doesn't make sense for the player to travel out of the screen as is possible now.
On the other hand, you're forgetting to apply the scale to the width and height of your player when drawing.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot], Yahoo [Bot] and 4 guests