How do I move an object without rotation?

Get help using Construct 2

Post » Sat Mar 26, 2016 7:36 pm

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:
Code: Select all
if mouse over hitbox
   Set angle to (whatever) degrees
   Move forward 2 pixels


But setting it to, say, 270, makes the whole map flip on its side.
B
17
S
3
G
1
Posts: 13
Reputation: 1,370

Post » Sat Mar 26, 2016 9:47 pm

Don't use a behaviour?

Something like:

every tick, if mouse is over west, map.setX to map.X + 2
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Sat Mar 26, 2016 9:59 pm

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.
Mistakes were made.
B
48
S
23
G
107
Posts: 1,576
Reputation: 60,168

Post » Sun Mar 27, 2016 1:44 pm

if you wnt rotate sprite without change angle, use bullet behavior
set in bullet proporties- set angle 'no'
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests