How do I exclude a sprite from gravity

0 favourites
From the Asset Store
Gravity Square is a game where I aim to reach the square at the polka dot door :)
  • Hi,

    On start of layout my gravity is set to 0.

    In the center of my layout there's some platforms moving from left to right and back, by setting physics velocity, and reversing that on collion with the wall. Now, my mechanic switches direction of gravity on key press which makes the player (ball) fall from bottom to back etc ...

    When I turn on the gravity though, my 'animated' platfoms also follow gravity. Is there a way to exclude them from gravity?

    setting immovable stops all moving, density settings seem not to be in play here , ...

    thnx in advance!

    sven

  • ok, waited like 2 days and I sank to page 3 and still no reply

    guess 'm asking this the wrong way, or there is no way to do it?

    thnx anyway.

    sven

  • Are you able to upload the capx? It would be easier if we can see your setup

  • you mean like this

  • Lordshiva has it kinda right. That's it actually. Secret here is to animate 'm with a sine behaviour and not adding a physics behaviour to them?

    Got the platform working that way. Got no collision between the ball and the pink platform though, but I read that is imopssible when one of the to objects hasn't got the fysics behaviour attached. Shiva, In your capx file you mimmick this, right?

    Big thnx to indieKiwi and Lordshiva.

    sven

  • Most welcome nonius. We are here to help if we can

  • appreciated it is!

    s.

  • nonius you mean like this

  • yeah, that's the idea. But it is a random bounce angle approach, which sometimes has a weird feiling over it.

    I have an idea to overrule this. I'll update a new .capx soon.

    s.

  • nonius Good now it's up to you to work it out the way you like. We can only guide you rest is up to you. Good luck

  • Try Construct 3

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

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

    This time I set physics to my pruple platform. I set its position to that of an invisible (blue) platform with sine motion and NO physics.

    This works great, as in real physics bounce offs etc. , only prob : it rotates around its center (arrows up an down to make ball hit platform).

    If onnly I could hook it to 2 or more points.

    gr.

    sven

  • is this type of movement you want nonius

  • yeah, the pinning did it.

    I cleared out some more action beceause they made things complicated and wrong.

    thnx for guiding me to this (attached) solution

    1) physics to visible object

    2) sine to hidden object

    3) pin the first tot second on both position and rotation

    awesome!

    s.

    (fot testing attached file, still arrows up and down to switch gravity)

  • Good work and most welcome

  • thnx for the guidance!

    s.

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