How do I move an object without rotation?

1 favourites
  • 4 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Hello.

    I am making an interactive map. When the mouse hovers over 4 "hitboxes" (n, s, e, w) the map is supposed to move in that direction. However I can't for the life of me figure out how to move objects without them physically rotating. I want the map to move east when I'm hovering over the east hitbox (I guess that is a 0 degree angle?), but I can't make it go to that angle without the map turning on its side.

    I tried several things before the hitbox idea (pinning, scrollto, bullets) but I think this is closest to what I want, I just don't know how to move an object without it turning towards that angle.

    What I'm using right now is a simple:

    if mouse over hitbox
       Set angle to (whatever) degrees
       Move forward 2 pixels[/code:rpclc47j]
    But setting it to, say, 270, makes the whole map flip on its side.
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Don't use a behaviour?

    Something like:

    every tick, if mouse is over west, map.setX to map.X + 2

  • Or, if you did want to use a behavior, bullet should be suitable. There is a property you can set for the bullet behavior "Set Angle". If you change that to "No", then the object will not turn while moving.

  • if you wnt rotate sprite without change angle, use bullet behavior

    set in bullet proporties- set angle 'no'

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)