How do I create realistic oval/egg shaped physics

  • 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

  • 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!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

  • 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.

  • 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!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)