shoot straight up

Get help using Construct 2

Post » Mon May 01, 2017 8:31 pm

Hi Scirra community,

I was follwing this YouTube tut https://www.youtube.com/watch?v=o-l6DA9I77E - "Rotary Tutorial In "Construct 2" | Mario Galaxy Mechanic"
So you move left/right and the player-sprite remains fixed, but everything else on the layout rotates (pretty cool).

So I added a Touch control so the player spawns a bullet-sprite. I want the bullet-sprite to go up and if rotation, continue in that projector (ghosh - I hope this makes sense???)

Here's a video of what I did http://robfreeman.co.uk/game_demo/

on Layout0, everything rotates.
on Layout1, I have an anchored a Yellow block 'TARG'... my green-thin-line bullets are supposed to always point towatds this marker on create.... but i cannot get it working.

here's my capx http://robfreeman.co.uk/demo.capx

I'd be grateful of any assistance.
Roberto
B
4
S
1
Posts: 47
Reputation: 471

Post » Wed May 03, 2017 7:45 pm

You need your projectiles to be on a layer that is not rotated.

Then you can translate your objects' positions in rotated space into the absolute space coordinates, using CanvasToLayerX and CanvasToLayerY.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,416
Reputation: 4,826

Post » Thu May 04, 2017 6:23 pm

Thanks gumshoe2029,
I've never used CanvasToLayerX before as I'm still a noob. I will however, research CanvasToLayerX.

Thanks,
Roberto
B
4
S
1
Posts: 47
Reputation: 471


Return to How do I....?

Who is online

Users browsing this forum: ChesVCF, LaDestitute, OBLIVION, Solomon and 16 guests