Physics Behavior Strange Issue

Discussion and feedback on Construct 2

Post » Sun Feb 15, 2015 3:35 am

Hi guys,
I've been using the physics behavior to apply forces to objects, but I recently decided to add skins to my game and noticed something quite strange. I have given the actor a different animation frame for each skin, and a specific frame is selected depending on which skin is chosen. However, despite it being the same actor, the physics forces act differently depending on which skin is being used, almost as if each skin has a different mass. This seems quite odd to me because I am actually keeping the actor itself the same throughout and just changing the animation frame. Any help on what causes this and how to fix it would be amazing!

Thanks!
B
4
Posts: 32
Reputation: 268

Post » Sun Feb 15, 2015 3:39 am

Is the collision polygon the same for each frame?
B
40
S
19
G
61
Posts: 1,063
Reputation: 35,773

Post » Sun Feb 15, 2015 10:20 am

Physics object calculates the mass based on the collision shape size... if you are changing the collision shape between animation frames and the size of the shape is not equal, then the object mass will not be equal either.
B
13
S
3
G
1
Posts: 71
Reputation: 998

Post » Sun Feb 15, 2015 12:18 pm

Wow, I've never noticed that thanks!

Is there an easy way to set the collision polygon the same for each frame? For the first one I did "guess polygon shape", and then tried "apply to whole animation" but that just guesses each one individually. Ideally the polygon shave would be identical for all of them.
B
4
Posts: 32
Reputation: 268

Post » Sun Feb 15, 2015 12:24 pm

Set the collision polygon manually for one frame and then use the "apply to whole animation". It should keep the shame shape.
composer - multimedia artist
www.eli0s.com/en/
B
65
S
26
G
4
Posts: 1,145
Reputation: 9,572

Post » Sun Feb 15, 2015 2:21 pm

I realized the png size was different for each skin, so I copied them all into one file and saved them individually with the same size, then did apply to whole animation and it worked. Thanks for the help guys, much appreciated
B
4
Posts: 32
Reputation: 268


Return to Construct 2 General

Who is online

Users browsing this forum: Tokinsom and 5 guests