Guest_imported
New member
- Jan 1, 1970
- 0
I am trying to set an image's loc based on the mouseLoc. If I put the code for this in a mouseWithin handler, I experience a lag between the time the mouse moves and the time the image moves. How can I "attach" the image to the mouse so the image moves in synch with the mouse? I know it's possible because I've seen it in games like this one:
this is what I have been trying:
on mouseWithin me
courtSprite = sprite(1)
courtMember = courtSprite.member
posX = mouseH() - courtSprite.width/2
posY = (mouseV() - courtSprite.height/2) * -1
courtMember.model("du".transform.position = vector(posX, posY, -300)
end
this is what I have been trying:
on mouseWithin me
courtSprite = sprite(1)
courtMember = courtSprite.member
posX = mouseH() - courtSprite.width/2
posY = (mouseV() - courtSprite.height/2) * -1
courtMember.model("du".transform.position = vector(posX, posY, -300)
end