Jump to content

TypeError: this.data.getLocalPosition is not a function


Recommended Posts

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!

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.

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.


  • Recently Browsing   0 members

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