How do I platform physics?

0 favourites
  • 9 posts
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • Hello,

    I have a platform with a solid- and bullet-behavior, which is dosen't matter. Here you can see the settings of my platforms:

    ...also I have a player sprite, which has a platform- and physics-behavior. Actually, the player does not need the platform-behavior, but otherwise he falls through the platform. Anyway, here are the settings of my player:

    I have a query that checks if the player sleeps. But he dosen't sleeps. After he is falling on the platform, he fidgets around...

    How can I make my player is falling down, landing on platform and is ready to play? Thanks for help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello,

    Can you please explain more about your problem?

    And it is better if you send a capx file so we can see if there something wrong with your events.

  • That was the origin: https://www.dropbox.com/s/5l70r5e5okdhv ... .capx?dl=0

    The problem is, when the player hits the platform and the platform moves, the player hangs in the air or he is stuck in the platform. But the platform should take the player. The basic idea is simple golf game physics. The platform should behave like a basket. I hope you can understand me.

  • You should not use Physics together with any other movement behavior like Platform or Bullet.

    It is recommended that Physics objects are only moved with physics actions (apply force, impulse etc) and only interact with other physics objects.

    As for the issue with object not sleeping, I had a similar post a few days ago and R0J0hound recommended to use Chipmunk behavior:

    Chipmunk objects go to sleep much easier. So you can try it instead of the built-in Physics.

  • I think I solve your problem.

    You can download the edited capx file here.

    If this does not solve your problem or you need any help to understand what I edit, please let me know.

  • Meqara: Sorry my late answer. I worked on a solution... and yep, I have found the same as yours. The solution ist the Pin-Behavior. Once the player has landed safely on platform B, pin player to platform B and start the bullet behavior.

    Thanks for your help!

  • Meqara: I have found a new problem... Actually, the pin behavior works quite well, but it's not really enough for my project. The problem is that there are platforms that move from top to bottom (with a sine behavior). If the player is on such a platform, he "sinks" in the platform. Do you have an idea how I can fix this?

  • Wossi

    Try not to use pin, bullet, sine or any other similar behavior with Physics object.

    It's an official recommendation from Scirra:

    it is highly recommended to control Physics objects entirely via the Physics behavior (by setting forces, impulses, torques etc.), rather than trying to manipulate objects by Set position, Set angle etc.

    (...) For example, setting an object's position or angle will cause Construct 2 to teleport the corresponding object in the physics simulation to the object's new position, which does not always properly take in to account collisions. The same is true of using other Construct 2 behaviors at the same time as Physics.

    I don't know if it's applicable in your game, but maybe you could disable physics behavior when it's not required, then you can manipulate objects with Sine, Bullet etc. Re-enable physics when it's needed.

    If you are only using physics for its gravity, you can try Bullet or Platform with gravity instead.

  • dop2000: Thanks for your reply. That's a good idea! ...but it does not work really well.

    I'm just trying to work with the physics behavior now, but I do not know how to position my platforms with a smooth transition?

    ~edit:

    Ah, I found a solution in this post:

    It's working perfect for me. Thank you dop2000!

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