Jump to content

Pixi V3 Touch


pdiddles03
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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