0 Favourites

Please guys, I need your help !

  • Hi Guys,

    I finishing my physics based game, but there is only one problem in this game.

    All objects haves the physics behavior, including the main character. At some stages there is some blocks with the sine behavior, so, when the player falls at these blocks, the blocks naturally starts to move the play (similar to an elevator platform). But there is a problem: sometimes, something happens and the player bugs and he stay fixed at the screen (maybe because there is no gravity in physics behavior, I think" and the "side-elevator" platform continues moving.

    I will finish my game today, I must only fix it!

    Thank you guys, I hope it is not to much confuse.

  • You need to add a .capx file, even a small sample of what you are trying to do.

  • Sometimes something happens?

    When does what happen?

    he stay fixed at the screen means that the player doesn't move?

    Is the player overlapping something?

    Are you using the collision polygon of the animated player for the physics or do you have a detection sprite?

    Could the issue be that the collision polygon changes and as such the player suddenly overlaps the platform and gets stuck?

    A capx with just an example of the issue would help a great deal..

  • Hi Guys, thanks for the help!

    I made an example capx for you ! the game is not working in this example, is just to show you the bug.

    You only need to wait and see what happens with the character.

    Link:

    Thx

  • You generally can't mix Physics with other behaviours.

    From the manual:

    Manual movement & other behaviors

    If you move objects by events (e.g. set X, set Y) or other behaviors (e.g. also adding 8 direction to a physics object), the physics simulation will do its best to keep up with what you've done. However, it is usually more realistic to achieve the same thing by applying forces and impulses to physics objects. This keeps everything "in the physics world" and realistic.

    For example, if you use Set Position to move an object to the other side of the layout instantly, it has effectively teleported. That's not a realistic physical phenomenon, so the result may be unrealistic as well. To keep up, the physics behavior will spot this, and simulate the object suddenly moving extremely fast towards its destination point for one tick (about 1/60th of a second). That's an incredible amount of acceleration, speed, then deceleration. Remember, to keep a simulation stable, you should avoid extremes.

    Although you can add the Platform behavior to a Physics object, the two tend not to get along very well. Again, it's better to achieve the same thing by applying forces. See the Physics - rolling platformer example provided with Construct 2 for a demonstration of how you can achieve this.

  • Hi BlackHornet, thanks for your reply!

    I understood your comment, but I didn't get exactly how I will fix it by using platform behavior and make it appear "natural"

    I don't know if you check my capx example, but I will be happy if you can give me a code example of how can I fix it.

    Thanks!

  • Please, can anybody help me? *.* I only need to fix it to publish my game.

  • Ok very simply put:

    Remove the sine behaviour and try to replicate it using physics..

    Having both behaviours gives unexpected and unwanted results as you have noticed..

    Either make everything physics or fake the physics parts with other behaviours, movements, events and actions..

  • Hi LittleStain, if I remove the sine behavior, how I can do the auto movement of the blocks?

  • why you just use the solid behavior instead of physics in the blocks? and keep the sine behavior, in my game i use also blocks with the sine behavior and i add solid behavior to them so the player can stay over the blocks, all work fine for me

  • I removed the physics behavior of the block, but the character falls :/ , it doesn't stay at the solid blocks... it only works if haves physics behavior :/

  • Hey guys I think I fixed it ! I've changed the FRICTION and ELASTICITY of the blocks to 0.... and it works.. I'm checking if there error will continue

  • nice to hear that we hope that your problem will be fixed

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • It works !!! thank you so much.

  • you're welcome my friend

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