nana Posted May 4, 2016 Share Posted May 4, 2016 Hello, So i have some problems with my code, i wanted to drag some objects but i have this error! This is my code poisson.mousemove = function(data) { if (this.dragging) { var newPosition = this.data.getLocalPosition(this.parent); this.position.x = newPosition.x ; this.position.y = newPosition.y ; } ; }; and when i try to drag my object i have this error TypeError: this.data.getLocalPosition is not a function Some help! Thank you! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 4, 2016 Share Posted May 4, 2016 Is that pixi.js? then its function(event) { event.data.getLocalPosition(...) } Quote Link to comment Share on other sites More sharing options...
nana Posted May 7, 2016 Author Share Posted May 7, 2016 Thanx! 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.