Hi. I made a game where the user can draw a line on the screen and then walk on it with his caracter. The way I acomplish this is a bit lame. When the caracter hits the line, I set dy to 0. dy is of corse the variable wich stores a value that is added to the character’s _y value on the screen, resulting in an ilusion of gravity.
This method only prevents the character of falling through the line vertically. Therefore the character may pass through walls in the horisontal direction. How can I build an unique algorithm to accomplish both verticall and horizontal colisions?
thanks for reading.
Example of my game is attached.