pdiddles03 Posted July 8, 2015 Share Posted July 8, 2015 Alright, so I am upgrading my game to v3 and it seems the touch event functions have changed. I used to use this: sprite.touchstart=function(e){ alert(e.getLocalPosition(sprite)} to get the position of the object. That doesn't seem to work anymore. is there a resource I can use to get positions using touchstart and touchmove? Quote Link to comment Share on other sites More sharing options...
xerver Posted July 8, 2015 Share Posted July 8, 2015 You are looking for `e.data.getLocalPosition(sprite)` Quote Link to comment Share on other sites More sharing options...
pdiddles03 Posted July 8, 2015 Author Share Posted July 8, 2015 One more quick question, when setting a tiling pixi sprite, i can't set the anchor, do you know why? did it's syntax change? Quote Link to comment Share on other sites More sharing options...
xerver Posted July 9, 2015 Share Posted July 9, 2015 What do you expect the anchor to do? The texture isn't anchored to anywhere on a TilingSprite, it covers the entire sprite by tiling over it.If you want to offset the texture on the TilingSprite use the offset: tilingSprite.tilePosition.x = 16; tilingSprite.tilePosition.y = 16;http://pixijs.github.io/examples/index.html?s=basics&f=tiling-sprite.js&title=Tiling%20Sprite Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.