Calculate Center of Mass

0 favourites
  • 7 posts
From the Asset Store
Change the size and position of everything without calculating anything!
  • Hello! I wanted to create a space ship with realistic space environment, but when I try to accelerate, the space ship doesn't have the correct center of mass (because I am forced to use the origin. I want the ship to go straight, but if the center of mass is off center at all then the ship starts to turn uncontrollably.

    Any help would be appreciated.

    Tagged:

  • Unless you're trying to make QWOP in space, I highly recommend not using the physics plugin for a top down space controls. There should be an asteroids example in C3 you can reference for inertia based movement.

  • Thank you for your reply!

    Can you please explain what you mean by QWOP?

  • QWOP was a physics based game about running, where due to the physics based controls, the character was more or less impossible to control.

  • For my game, I am leaving it up to the player to control the ship, but it can also fly autonomously. I agree it might be difficult to control, but this is the most accurate of what I want it to do. I checked out the space shooter tutorial, but the turning isn't exactly what I want. I also need to use physics for other parts I am making. Any other ideas? I appreciate your time!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If the issue is just with the center of mass, you need to use a symmetrical collision polygon, or set Collision Mask=Bounding Box in Physics properties. If your ship sprite has a complex shape, maybe use a different invisible object as a ship body instead, and pin the visible sprite to it.

    I have an old demo, maybe it can help:

    dropbox.com/s/9rjbrl0wpc1zzsv/SpaceVaisseau2.capx

  • Sorry haven't been on in a while but I think I see what your saying dop2000.

    Overall this might be a better choice, but it seemed to fix the problem by just constantly rounding the angle down so it never got the opportunity to change.

    I'm definitely going to try your idea though!

    Thank you for your help!

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