How do I rotate sprite without affecting collision box?

Get help using Construct 2

Post » Tue Dec 08, 2015 12:18 am

I'd like to rotate back and forth in a ping-pong loop, just like LiteTween does without the collision box getting rotated.
B
39
S
12
G
14
Posts: 1,110
Reputation: 11,184

Post » Tue Dec 08, 2015 12:49 am

You could use a invisible sprite that don't rotate to be your object with the colision points and then add another sprite with the image you like on top of it, using the pin behaviour and to be the rotatory one. All the colision actions must be refered to the invisible sprite.
B
13
S
5
G
1
Posts: 48
Reputation: 1,139

Post » Tue Dec 08, 2015 9:12 am

The trouble is I don't want to use double s as it will be for an enemy and that would cause massive headaches for the multiple instances. Is there a shader that could do this?
B
39
S
12
G
14
Posts: 1,110
Reputation: 11,184

Post » Tue Dec 08, 2015 1:31 pm

Why would it cause massive headaches?
Just put the two objects in a container..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Dec 08, 2015 1:41 pm

Because the enemies would need containers for every instance of themselves, and they would need to be pinned to their animations?
B
39
S
12
G
14
Posts: 1,110
Reputation: 11,184

Post » Tue Dec 08, 2015 2:00 pm

Still don't know what the issue would be..
One click in the editor - add to container..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Dec 08, 2015 2:46 pm

How would I create containers for multiple enemies though? Would I have to place them behind the animation sprites for each one?
B
39
S
12
G
14
Posts: 1,110
Reputation: 11,184

Post » Tue Dec 08, 2015 2:56 pm

I always create sprites through events instead of in the editor, but If there are the same amount of enemies as there are collision boxes ther shouldn't be an issue..

Example
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Dec 08, 2015 4:58 pm

So it automatically selects a box if there are multiples? Is there a benefit to creating sprites via the event editor?
B
39
S
12
G
14
Posts: 1,110
Reputation: 11,184

Post » Tue Dec 08, 2015 5:12 pm

Zebbi wrote:So it automatically selects a box if there are multiples? Is there a benefit to creating sprites via the event editor?


A container creates all it's contents on created, it will first use what is on the layout..
(Try removing two of the yellow sprites in the editor and run the program again, it will still look the same..)

I guess it depends on what kind of game you sre making and what you are used to..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: AllanR, bikachu, oosyrag, wirelesstkd and 1 guest