How do i give my object a "heavy" point

0 favourites
  • 2 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Hey guys i was trying to figure this one out but i can't seem to think of a solution.

    In my game objects move, fly, fall and what not. Some object would be so much better when i could put the "weight" on where it belongs.

    Let say you got hammer. The hammer head is obviously the heaviest part of the hammer. If you would let the hammer fall down with the hammer head up at an slight angle at one point the hammer will turn to the hammer head and keep on falling that way.

    This is the kind of behavior i want to replicate. If i would throw the hammer now with an 90 degree angle it would simply keep on flying with the hammer head left and the hammer handle right. In the real world this wouldn't be possible since it would turn till the heaviest part ( the hammer head ) will be at the bottom. Yay for gravity.

    Is there any solution for this within Construct 3?

    Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Physics behavior don't take in account the graphic appearance of your objects.

    However it does take in account and measures the heavy part of you bounding box, so if you have your collision box done properly they should act normally, what you have i think now is a rectangle bounding-box probably which makes the objects act like square even weight type.

    To adjust your collision boxes on sprites go to animation, and on left side you should have a collision box editing feature.

    On physics behavior you need to also adjust which collision box shape should the physics behavior use, and you have 3 choices, 1st would be Collision Polygon - which is defined by your animation editing - this is what you want for best results.

    2nd choice is bounding box which makes all physics objects of that type ('hammers'), to act as a even weight square thing.

    3rd choice is circle, usually used for circular objects ie. 8-balls.

    Another very important thing that needs to be adjusted on your objects, after you made a custom collision polygon is the objects origin point. If you put the origin point on the hammer head, then that will be taken as the center of mass for the object. The origin point is always going to be 0 as id recognition in the Construct system, no matter what other points you add or even if you rename it. So if you have the origin point put at the end of the handle center of mass shifts there causing ur hammer to fly backwards, you might want to put image point 0 to the hammer head, and if you used it as the position to pin it to player hand u can create image point 1 and pin that to the player hand.

    Hope it made sense! i rambled to much i think... in short play with ur Image points.

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