frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

Problem with "mousemove" block

edited September 8 in Bugs
I'm trying to make a game where you have a "pointer" that lets you interact with objects. It's supposed to point at the mouse but whenever I use mousemove to make it point at the mouse, it doesn't have 360° movement.
http://flowlab.io/game/view/944959
Tagged:

Comments

  • So here's the issue:

    1) The MouseMove block outputs the mouse position on the screen
    2) The PointAt Block points to a position in the level
    3) The screen and level coordinates are not the same, since the Camera is scrolling

    You can fix that by adding the camera position to the screen position. Here's an example: https://flowlab.io/game/play/685073
  • Thank you! I had trouble with this for a long time! This is really useful.
Sign In or Register to comment.

flowlab.io

| make games in your browser
@ 2017 Flowlab.io, All rights reserved.

Contact us

Get In Touch