Jump to content


Photo

HTML5 and collision mask


  • Please log in to reply
2 replies to this topic

#1 Metronome

Metronome

    GMC Member

  • GMC Member
  • 22 posts
  • Version:GM:Studio

Posted 18 February 2012 - 06:19 AM

Iam using this code to get precise collision

tspr = sprite_add("../../../trapped/frontend/storage/"+string(global.genid)+"/map.png", 1, true, false, 0, 0); //one sub-image...
sprite_collision_mask(tspr,false,1,0,0,sprite_width,sprite_width,0,254)
sprite_index = tspr;

but it seems to be full image rectangle collision, please check what iam going wrong

GM:HTML5 1.0.200

PS: Sprite is square png with transparent background

Edited by Metronome, 18 February 2012 - 06:20 AM.

  • 0

#2 Mike.Dailly

Mike.Dailly

    Evil YoYo Games Employee

  • Administrators
  • 1497 posts
  • Version:GM:Studio

Posted 18 February 2012 - 12:32 PM

You can't currently change the collision mask, there is a bug currently filed, but with Studio, we haven't gotten around to it yet. Sorry.
  • 0

#3 Metronome

Metronome

    GMC Member

  • GMC Member
  • 22 posts
  • Version:GM:Studio

Posted 18 February 2012 - 06:42 PM

You can't currently change the collision mask, there is a bug currently filed, but with Studio, we haven't gotten around to it yet. Sorry.


Thank so much for quick reply
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users