Set object to mouse cursor with rotating layout?

Get help using Construct 2

Post » Thu May 29, 2014 9:08 am

I was messing around with the new lighting system, where it's already set up to have the light source set to the position of the mouse.

I then added in a simple piece that would rotate the layout.

Every tick - Set layoutAngle to layoutAngle+1

The light simply doesn't follow the mouse cursor anymore. I've tried using absolute in the hopes that that works, but sadly not.

Is this even possible with rotating layouts? It seems to base the position on where the mouse cursor would be if the screen wasn't rotating.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 961
Reputation: 10,717

Post » Thu May 29, 2014 9:12 am

Without CAPX one cannot help you
B
245
S
39
G
15
Posts: 1,941
Reputation: 40,246

Post » Thu May 29, 2014 9:30 am

Lordshiva1948 wrote:Without CAPX one cannot help you


Seriously? It would take less time to create it than it would to upload it, seeing as it's already in the examples folder.

https://copy.com/4HFigE8IrfzT

*EDIT* My mistake - I forgot to mention I was using the lighting example.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 961
Reputation: 10,717

Post » Thu May 29, 2014 12:05 pm

Use Mouse.X(0), Mouse.Y(0) to get the mouse position on layer 0.
Or Mouse.X("layername"), Mouse.Y("layername").
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,630

Post » Thu May 29, 2014 12:12 pm

Ahh, nice!

Thanks @ramones!
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 961
Reputation: 10,717


Return to How do I....?

Who is online

Users browsing this forum: jkmalau and 17 guests