Author Topic: Transparency collision TileMap  (Read 1016 times)

ricardo_sdl

  • Member
  • **
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Transparency collision TileMap
« on: Tue, Apr 26, 2011 »
I created the following sprite:


And I created a tilemap and imported it to the flixel code. When I activated the collision between the tilemap and the characters the collision is not pixel perfect. The transparency of the sprite is being considered in the collision detection. How can I change this? Do I have to change the sprite or can I change the code?

I'm using the latest build of Flixel library.

Arkeus

  • Contributor
  • ****
  • Posts: 321
  • Karma: +1/-0
    • View Profile
    • I, Arkeus
Re: Transparency collision TileMap
« Reply #1 on: Tue, Apr 26, 2011 »
Flixel doesn't have pixel perfect collision by default. You can check out Photonstorm's tools, but if you want it in tilemaps, you'll probably need to modify the code.

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: Transparency collision TileMap
« Reply #2 on: Tue, Apr 26, 2011 »
Correct, flixel does not ignore alpha pixels in anything really, all collisions are box v box.  Check out the power tools and if that's not what you wanted either then it's not TOO bad to customize or rewrite collision processors in v2.50