How do I make a physics object conveyor?

0 favourites
  • 3 posts
From the Asset Store
112 High-Quality destruction sounds for videogames
  • I have been trying to figure this out, and to be quite frank, I am stumped.

    So Im working on a game, and in said game you can drag and drop objects around. I decided not to use the default drag and drop, and to make my own so I can tweak it around. One of the things I did with this is making my own gravity. Its a constant force that is applied every tick, and I can turn it off and on per object at will pretty much.

    Recently I decided to add some sorry of conveyor. A basic rectangle that, when one of the objects is placed on it, it would move constantly in either right or left (depending on the type of conveyor)

    the first thing I did was simple, on collision - move at angle. But that didn't work, that's fine.

    I tried combinations of collision and stuff like that, but nothing worked. I tried adjusting the gravity settings, and even messing with overlap instead, nothing was working.

    So after a while, since I had not added the conveyors to the solid family, I could phase the physics object through it. For some reason the physics object then was stuck inside of it and.... it worked.

    WHAT!? so far after a few hours of messing around, the only thing that makes it work is when it has the overlap condition, and the physics object is phased and stuck into the conveyor. This is not a solution, as I need the physics object to be on top of the conveyor and to be intractable, because most of the game has physics.

    so, what do I do? here is my capx:

    mediafire.com/file/uy5ae2hccdbbmgq/The_Rocky_Machine_Full_Game.c3p/file

    thank you!

  • Hello. I have an idea about that. you can make it so when an object is on collision with the conveyor it moves a direction and there can be a switch to swap the direction of the conveyer

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dropbox.com/s/3mbjkjh35w4g98u/physicspushingexample.c3p

    Use an invisible helper sprite to define a "pushing" zone. Although this method is more suitable for platform behavior. This example uses 0 friction surfaces, and defining the physics velocity on a fixed, immobile surface. This will probably not be ideal in a situation where other outside forces will act upon the objects in question.

    Another way to get constant motion is to apply a force exactly equal to the amount of friction acting upon the object. I don't know how to get that number.

    To do it properly in a full physics environment, your conveyor should actually consist of moving elements, and apply forces on objects resting on them via friction.

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