It´s possible to make splatt hit&out body?

0 favourites
  • 4 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi all,

    It is very easy to detect the hit of a bullet and spawn a splatt using "on collision with...", but, it is also possible to detect the output of the bullet and generate another splatt?

    I'm doing some tests using offset detection:

    But I can not get the result I'm looking.

    The other problem is that if you need to calculate the trajectory of many bullets at the same time, this can cause too many cpu usage and a direct impact on fps.

    Any idea is welcome!

    Thanks

  • You could "cheat" and simply make your projectile do the work for you...

    1. Bullet hits enemy/player

    --- set bullet invisible

    --- set instance variable HasHit to "true"

    2. Bullet variable "HasHit" is true AND is not overlapping enemy/player

    --- create blood splatter (at angle of bullet)

    --- destroy bullet

    So basically the bullet doesn't destroy itself until it's gone in AND out again from an enemy, creating a blood splatter on entry AND exit if you want.

    I'm sure there's some genius mathematical solution to this - but I'm a creative thinker not a mathematician - so that's probably how I'd do it. The bullet is already travelling at a given angle and velocity, so why not use that data and positioning? Faster bullets could create bigger splatters, or whatever... there's a load of ways to use existing data as random variables

    ~Sol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That was exactly what I was looking for, thank you Sol!

    I did a couple of tests without much detail to see how can it looks:

    With bullet destroy:

    Without destroying the bullet:

    It does not look too bad to be a sketch, once again, thank you Sol!

  • No problem mate!

    I'm REALLY bad at trying to do stuff the "proper" and "mathmetically genius" way - but I can redneck engineer almost anything to work

    Hit me up if you get stuck with anything else like this

    ~Sol

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