How do I get Spriter animation collisions to work?

Get help using Construct 2

Post » Wed Mar 26, 2014 2:14 am

I have an platform that I created a Spriter animation for so that it tips over when you jump onto it, but when I give the image a solid behavior the collisions only go half way up the image. The collision box is around the entire image but I am able to jump through the upper half of the platform.

Anyone have any idea what is going on, or could this be a possible bug?
B
3
Posts: 4
Reputation: 208

Post » Wed Mar 26, 2014 2:15 am

is the collision box the same for each frame of the animation?
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Wed Mar 26, 2014 2:32 am

I imported my animation from the program Spriter, it's not a construct 2 animation, are there different collision boxes for each frame of a Spriter animation?
B
3
Posts: 4
Reputation: 208

Post » Wed Mar 26, 2014 2:44 am

B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Wed Mar 26, 2014 2:56 am

Yes I have, it doesn't have anything about collisions like this in the video.
B
3
Posts: 4
Reputation: 208

Post » Wed Mar 26, 2014 8:38 am

A spriter animations is made of parts, Maybe be your "parts" have a wrong hit box, but I don't think it's a good idea to rely on Spriter animated "parts" hitbox, and I don't you can manage a correct collision system for the player with that many hitboxes moving.

Since the wrapper sprite can't have a hitbox, I immediately prefered to make the whole Spriter animation stick to a single invisible sprite (with function Pin for example) wich is actually the real player controled sprite, then I can define a hitbox like usual. For sure this hitbox won't adapt to each different frame of the Spriter animation, this way you have to keep a "global" hitbox for this character, but is it really a problem ? This way, this is functionning just like usual in Construct 2, Spriter only take care of a visual animation.
B
8
S
4
Posts: 131
Reputation: 1,205

Post » Wed Mar 26, 2014 4:12 pm

That's what I was thinking I could possibly do, thanks for the input. I just found it weird that collisions work perfectly, even during the animation, on the bottom half of the sprite but not the top.
B
3
Posts: 4
Reputation: 208


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], Zzarkz and 25 guests