Using physics to push objects around

0 favourites
  • 2 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi,

    I have been trying to figure out how to get objects to push each other around when they collide, without overlapping each other. I am sure this can be done with the physics behaviour but I couldn't figure out how to get the objects to move at a set(constant) speed then stop, rather than accelerating and slowing down.

    • Eventually the movement will be controlled by touch.
    • Objects should slide along the walls rather than stopping.
    • Objects should be able to push each other around.

    I have included a cap file that shows how I would like the movement to be. Use arrow keys to control player:

    capx

    Any help on how I can get a similar style of movement using physics objects would be great... or how I can adapt the current cap file to include wall slide and pushing of objects.

    Cheers

  • Try Construct 3

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

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

    Once again thanks :) after a little playing around I managed to use your example to get the result I was after.

    I did have a few questions (but didn't want to derail your other thread)is it possible to have objects of varying sizes/radius?

    Also I originally used the first created instance of p1 and stored its UID so I could then reference it to be used as the player. However I didn't know how to do a comparison between the first instance of p1 and all other p1 objects so that I can then make them avoid it.

    In the end I had to add a separate player object, this isn't ideal it would be better if it was also included with the p1 collision events.

    Use mouse to control the player, Cap file:

    capx

    Cheers

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