Jump to content

Issue/Bug with rotated sprites and their clickarea


Matthias Elephant
 Share

Recommended Posts

Hi :)

I have a problem with rotated sprites. 

 

var button = this.game.add.sprite(0, 0, 'ATLASNAME', 'hello');
button.inputEnabled = true;

button.events.onInputDown.add(function() {
     console.log("test");
}, this);

 

{
	"filename": "hello",
	"frame": {"x":387,"y":1,"w":94,"h":42},
	"rotated": true,
	"trimmed": false,
	"spriteSourceSize": {"x":0,"y":0,"w":94,"h":42},
	"sourceSize": {"w":94,"h":42},
	"pivot": {"x":0.5,"y":0.5}
}

 

The image will be displayed correctly...but the "click area" is not rotated!

What i have to do for rotating the "clickable" area?

Someone have an advice?

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...