Solid Objects

0 favourites
  • 6 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I want the monsters and player are solid, so they can not overlap. Use behavior and lower solid examples, but does not work. Under the file.

    The player can not move, do not move. He always has a fixed position in the game. thank you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'd like to know too.

  • I managed this with Solid + Bullet with BounceOff Solids Yes.

  • Doesn't work... But, if i can't do this, what about just horizontally? How do i do it?

  • In my experience "Bounce Off Solids" works well only when bouncing off of stationary objects.

    For example this uses "Bounce Off Solids" for everything.

    https://dl.dropboxusercontent.com/u/542 ... owd_1.capx

    Notice unsightly teleportation when objects get in close quarters.

    So one Idea that eliminates the teleporting is to have the enemies not have the solid behavior and resolve their collisions as they move with events. Basically it involves checking the distances of every enemy with all the others. If the enemies are too close we can calculate exactly how much they are overlapping and then can move one enemy half the overlap one way and the other enemy half the distance the other way.

    https://dl.dropboxusercontent.com/u/542 ... owd_2.capx

    One thing that is not addressed is changing the enemy's speed. They will appear to stop until the path is free and they will jet back at their original speed.

    In this final example I addressed the lack of bouncing. To do it I needed to get and set velocity x and y so I opted to remove the bullet behavior and do the movement with events.

    https://dl.dropboxusercontent.com/u/542 ... owd_3.capx

    It works well, but there is no collision response with the walls.

    You could make example 2 work with the bouncing in example 3 by converting the bullet behavior's speed and angleOfMotion to vx and vy with:

    vx=speed*cos(angleOfMotion)

    vy=speed*sin(angleOfMotion)

    doing the calculations and then converting back with:

    speed=distance(0,0,vx,vy)

    angleOfMotion=angle(0,0,vx,vy)

    Another idea would be just to use the physics behavior for the whole bit.

  • Could we just get behavior that would take care of it please?

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