Vizcur Posted January 23, 2015 Share Posted January 23, 2015 I have a problem when I get the position of Input (click, touch, etc...) in a event and then try to put a sprite in the same position. This happen when the game is in (100%, 100%) screen mode, i.e , the sprites in a scene are responsive to the screen size.In this case, the position of the sprite is "shifted" a space versus the mouse click, the problem is: this "shift" is not constant, and the image is not exactly in the sprite.x(y) position.More details: I have a image 800 x 600 per example in a sprite, this sprite is responsive to the touch or click event, when this happen, I put a new sprite in the position of the click, but... well, the thing I said at the beginning. Thanks. Link to comment Share on other sites More sharing options...
Daniel Belohlavek Posted January 24, 2015 Share Posted January 24, 2015 Would you mind sharing some code? May be the responsive logic you are currently implementing. That way It'll be easier for us to help you! Good luck Link to comment Share on other sites More sharing options...
Vizcur Posted January 26, 2015 Author Share Posted January 26, 2015 Well, I solved my problem, just I used the function : this.game.input.getLocalPosition(container, pointer, new pointer); And this give me the relative position to some container . I expect this can be usefull for somebody. Thanks anyway . Link to comment Share on other sites More sharing options...
Recommended Posts