Sign in to follow this  

One way collision on tilemaps

Recommended Posts

Hey, I am hard at work on my game "Space Cat" and I have some questions about one way collision on tilemaps. Like, is there a way to do this without making the one way colliding tiles into immovable objects (which I assume isn't TERRIBLE, it still uses the quadtree but it has to update more variables).

I have a collision tilemap in two layers, one with "ground" and "walls" and one for one way platforms. The problem is how the tilemap body is handled isn't super clear.

I was thinking of writing an extension of the collide function to specifically deal with this. 

Any help would be groovy.

Share this post

Link to post
Share on other sites



tile.collideLeft = false;tile.collideRight = false;tile.collideUp = true;tile.collideDown = false;tile.faceUp = true;tile.faceDown = false;tile.faceLeft = false;tile.faceRight = false; 


I am curious to know if there is any difference/preference between this and setCollision

Currently I'm having problems getting collideDown to work at all.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.