Search Results

Search found 1 results on 1 pages for 'user220631'.

Page 1/1 | 1 

  • Why does my player stop when stepping onto a new tile?

    - by user220631
    Me and my friend are creating a game from scratch. He is in charge of art design and I am in charge of coding. I have done well so far with the code, but I have a collision detection problem when the character moves right: Once the player moves right, whenever a new block is encountered, the player stops. I don't know if this is a problem with collision or the player but I can't work around it. Here is the collision code: this.IsColliding = function(obj) { if(this.X > obj.X + obj.Width) return false; else if(this.X + this.Width < obj.X) return false; else if(this.Y > obj.Y + obj.Height) return false; else if(this.Y + this.Height < obj.Y) return false; else return true; } I also wanted to see if there as a way to make the player collide with the bottom of the block and the right side of the block instead of running through it.

    Read the article

1