Hello Guest

Author Topic: Tilemap Collision And Character Controller.  (Read 4532 times)

HeuGamer

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 8
    • View Profile
Tilemap Collision And Character Controller.
« on: April 22, 2013, 01:52:47 pm »
I have a tilemap with collision setup in the sprite collection as box trimmed and a Character controller. The problem is they do not collide at all. What could the problem of this?

Here's a webplayer example
https://dl.dropboxusercontent.com/u/67760294/problem/Desktop.html

As you can see the character controller and tilemap does not collide, and yes there are colliders on the red walls.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tilemap Collision And Character Controller.
« Reply #1 on: April 22, 2013, 07:39:56 pm »
Hard to say what the cause it without actually looking at your scene, and how you've configured it. When you look at the scene, does the character controller intersect properly with it? Have you rotated the tilemap with it lying on the XZ plane instead of the default XY?

I can say for certain that it does work. If you can, send me a a simple repro project to look at (support at unikronsoftware.com), that might be the best way to solve this. If not, let me know and I'll see if I can find one of the demos I developed for this ages ago.

HeuGamer

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Tilemap Collision And Character Controller.
« Reply #2 on: April 23, 2013, 12:44:28 am »
I found out my Z axis on the character was off from the tilemap, so the character was extremely high... now it can collide, but now the collision is really off and the animation doesn't play but instead blinks.

I forgot to point out. If this matters that my sprite are 16x16 making all the positions weird meaning instead of Moving X to 1 I have to move it by decimals
X:1 = X:0.1 Could that be a problem?

Also I'm using XY coords and I couldn't find a way to upload my project without uploading your 2dtoolkit... Kinda don't think that would be a good idea.


Anyways here an example with the character on the same Z as the tilemap
https://dl.dropboxusercontent.com/u/67760294/Problem%202/Desktop.html


unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tilemap Collision And Character Controller.
« Reply #3 on: April 23, 2013, 08:34:58 am »
Something defeinitely weird here (you using a perspective camera? That might explain the difference in depth...)

Anyway, if you can send the project, send a dropbox link, etc. to support at unikronsoftware dot com and I'll take a look at it. Obviously something wrong there - it will likely take far longer to troubleshoot like this than to just look at it and work it out.