Best Method for Precise Bullet Collisions?

0 favourites
  • 4 posts
From the Asset Store
Particles support animations, collisions, effects and etc.
  • Hey all,

    I was wondering what the best method for implementing precise bullet collisions might be?

    What I'm trying to do is have the bullet destroy itself on impact with a wall and turn into a platform at the exact point of impact. Sometimes it works perfectly but others it spawns inside the wall, especially when I fire closer to the wall.

    I'm assuming it's to do with the engine not checking for updates quick enough? Every Tick doesn't seem to be cutting it in this case.

    Here's my capx file, hopefully I uploaded it correctly: https://dl.dropboxusercontent.com/u/96804667/Test.capx

    Thanks for any and all help.

  • I'm not entirely sure what is causing the problem but you can have on collision to set the bullets speed and acceleration to 0 so then you can see were it is landing.

    When I used debug mode and slowed the time scale down it hit on the edge perfectly every time. (Unless I was standing right on top of the thing of course.

    If you can't figure it out then you could always have the platform be set behind the blocks so that if it over lapped you wouldn't see it anyway.

  • One idea is you could put a sub event after your event 3 along the lines of

    while

    icicle is overlapping block -- move icicle 1 pixel at angle 180

    It would need some more thought if you can fire left as well as right...

    edit - another thought is just after you create the icicle move it in the z to behind block (this is a bit of a cheat but should look ok)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • One idea is you could put a sub event after your event 3 along the lines of

    while

    icicle is overlapping block -- move icicle 1 pixel at angle 180

    It would need some more thought if you can fire left as well as right...

    edit - another thought is just after you create the icicle move it in the z to behind block (this is a bit of a cheat but should look ok)

    The "While" sub event seems to have fixed it, wasn't sure how Loops and such worked so this knowledge might come in handy for future problems as well.

    Sorry for the late reply, the help was much appreciated!

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