Tile based platform game collision :(

BlitzPlus Forums/BlitzPlus Programming/Tile based platform game collision :(

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Ok this fixes it
;---------------
;right collision
;---------------
If vx>0
	;If vy=0
	
		If Abs(osx2-1)<=xpos1
			dx#=xpos1-(odx2)
			odx1=Abs(odx1+dx)
			odx2=Abs(odx2+dx)
			
			resolve=False
			collisionRight=True
		EndIf
		
	ElseIf osy1<(ypos2-1)
	
		If Abs(osx2-1)<=xpos1
			dx#=xpos1-(osx2)
			odx1=Abs(odx1+dx)
			odx2=Abs(odx2+dx)
			
			resolve=False
			collisionRight=True
		EndIf
		
	;EndIf
EndIf



I've commented out the "If vy=0" and related "EndIf" as it means it only does a right side detection if you're not moving down. You always want to be doing a right side detection if vx>0. Remember to remove it from the left side code as well. (the code is in tile map collision). PS your Rocket Racer game looks awesome.