Angle toward Mouse.XY problem

Get help using Construct 2

Post » Wed Feb 06, 2013 8:21 pm

Hi guys i got the following problem

I have an object, roating toward mouse position and im getting the angle in a global variable

The problem is when i scale the layout, then the angle is not right.
I imagine its about the object's scaled position but cant figure it out.

Anyone can help?

https://dl.dropbox.com/u/19082408/zzz.capx
B
12
S
3
G
1
Posts: 120
Reputation: 1,829

Post » Wed Feb 06, 2013 9:03 pm

have you tried Mouse.AbsoluteX/Y
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Wed Feb 06, 2013 9:30 pm

In fact i did
Didn't worked
B
12
S
3
G
1
Posts: 120
Reputation: 1,829

Post » Wed Feb 06, 2013 9:37 pm

Try Mouse.X(0) where "0" is the layer where your object stands
https://www.scirra.com/manual/114/mouse
B
20
S
5
G
8
Posts: 325
Reputation: 6,473

Post » Wed Feb 06, 2013 9:53 pm

Works perfect!
Thanks alot

btw the syntax is
Mouse.X("Layer")
B
12
S
3
G
1
Posts: 120
Reputation: 1,829


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests