How do I allign vertically objects of the same kind?

Get help using Construct 2

Post » Fri Aug 14, 2015 5:22 pm

I hope my explanation is comprehensible:
I have an object with different frames, three instances of the same are created on top of each other (like in the picture). Everything should rotate with the camera (set layer angle works for me), but I would like to allign these vertically, so they would look like they are one instance, rotating like any other individual sprite would.

Pin behaviour would be the super easy solution, but pinning an object to other of the same kind does not work for me, I read an old post about it but found no solution. I cannot rely on the X and Y coordinates either because i´m looking for a fixed Y point that would change when rotating the camera!

Image

Any help?
B
9
S
3
Posts: 153
Reputation: 1,272

Post » Fri Aug 14, 2015 7:15 pm

you could create an invisible sprite, and pin the objects to that.

I thought that the x and y coordinates for the layer wouldn't change by rotating the layer (only in relation the absolute x, y) but I don't rotate layers so I am not sure - I know from zooming layers that you have to be careful when how you compare things on different layers (convert the coordinates from one layer to another's).
B
99
S
35
G
20
Posts: 438
Reputation: 17,910

Post » Fri Aug 14, 2015 11:07 pm

Create an anchor object to pin group of instances. Put this anchor to one of those instances as a "head". Make sure the anchor follow the "head" all time.
ImageImage
B
114
S
51
G
24
Posts: 790
Reputation: 23,480


Return to How do I....?

Who is online

Users browsing this forum: plinkie, RIDETHEPIG and 7 guests