How do I create realistic oval/egg shaped physics

Get help using Construct 2

Post » Sat Mar 07, 2015 1:42 pm

Hello!

The player's character in my platform game is an egg/oval shaped object and I would like to create realistic movements for this object so that when it jumps while moving it will rotate and when it hits the ground it will wobble etc

I have been tinkering with both the physics and platform behaviours for a while now but can't find anything that realistically portrays the movement physics of an oval shaped object.

Thanks in advance,

Kilbur
B
6
Posts: 15
Reputation: 287

Post » Sat Mar 07, 2015 1:53 pm

So first, a caution against complex colliders... The more colliders you have, the more your game is going to slow down. Now, on to your question.

I'm going to level with you here, I don't think Construct can do what you need it to out of the box. You're talking about weird weighting, and how the heavy end of the egg effects that wobble, and those concepts aren't really in Construct, I don't think. (Someone PLEASE let me know if I'm off base).

That being said, with a complex collider map and some elbow grease, you can simulate that wobble, but not in a really automatic way. Essentially, when the egg collides with the ground (On Collision Enter) you can have the egg rotate using the "Rotate Toward Angle" action and some random numbers, you can have the egg rotate quickly, simulating that shake. It won't be realistic, and you may have to play with the conditions a bit to get it to work at all, but that might be the only way to do it.

Best of luck!
B
18
S
3
G
3
Posts: 82
Reputation: 2,543

Post » Sat Mar 07, 2015 2:51 pm

Alright thanks! I'm still very much an amateur user of Construct 2, but you have saved me a lot of time and effort because I would have kept on fiddling with the physics behaviour all day to no avail. The mechanic is not that vital to my simple game anyway, I can do it another way :)
B
6
Posts: 15
Reputation: 287

Post » Sat Mar 07, 2015 8:33 pm

With the built-in physics behavior you can approximate the egg shape with an up to a 16 point collision polygon. The Center of mass defaults to the center of the object, but you can use torque with an imagepoint to make it seem like the center is in a different location. Not mathematically correct but it looks good.
You do not have the required permissions to view the files attached to this post.
B
94
S
33
G
118
Posts: 5,394
Reputation: 75,849

Post » Sat Mar 07, 2015 9:23 pm

R0J0hound wrote:With the built-in physics behavior you can approximate the egg shape with an up to a 16 point collision polygon. The Center of mass defaults to the center of the object, but you can use torque with an imagepoint to make it seem like the center is in a different location. Not mathematically correct but it looks good.


That will do the trick, thank you!
B
6
Posts: 15
Reputation: 287


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests