How do I prevent shooting through solids?

0 favourites
  • 4 posts
From the Asset Store
Shoot balls to destroy as many blocks as possible, at each stage the game will become more difficult.
  • I have a lot of solid sprites and my bullet is supposed to bounce of them. They are around the bullet too. But sometimes the bullet just jumps through them. I guess that is just too much velocity and the collision check comes in too late? Anyways how would I prevent it? Reduce speed? Thicken the solids?

  • hey Shoening..you may need to show an example capx...

    collision detection is based on the Collision mesh ..if its too small then yeah the bullet may pass through undetected..

    your ideas are good for trying to prevent this ...

    but it comes down to specific solids and the meshes ..would need to see a demo or capx to really break it down and see what is happening..

    you could try using delta time scale and slow it right down to see if there is another problem ..

    like on start of layout set time scale to 0.2 or something..this might help you see whats going on...it may not either but it could point to your bullets being too fast..to activate the collision events on certain meshes

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
    • Create a family for all solid sprites
    • For a moving bullet you can check "is overlapping at offset" to pre-determine whether it is going to hit the wall.
    • If so, bounce it.

    Good Luck and hope my suggestions help.

    Cheers

  • studioamk I never used "offset" before. Thank you. Could you tell me what the differences between overlapping an offset and overlapping an object are? I mean there is only one bounding box right?

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