Search Unity

[UPDATED] Bullet Ballistics for Unity

Discussion in 'Assets and Asset Store' started by ChristianSchott, Oct 16, 2016.

  1. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    17
    render3.png

    Hi everyone,

    i just released an Asset to simulate real world like bullet physics in Unity.

    In a nutshell this package tries to immitate the bullet behaviour from Arma3 in a way that everyone can easily achieve the same effect in their own game.
    All the important forces like gravity or friction affect the bullets on their travel.
    And if they hit an object they will not automatically disappear, but depending on the ballistic properties of the object be reflected or continue their flight through the object while being deflected from their path and slowed down.

    Asset Store: http://u3d.as/BcM

    Demo: https://misterdreid.itch.io/bulletballistics

    Features:
    • bullet travel time
    • bullet drop
    • air resistance ( + wind influence )
    • object penetration
    • damage model ( dependent on bulletspeed )
    • custom materials with ballistic properties
    • automatic weapon zeroing calculations ( + generation of scope-zeroing-textures )

    Showcase video:



    Screenshots:

    penetration.PNG


    bullets.PNG

    editor.PNG

    scope.PNG

    Asset Store: http://u3d.as/BcM

    If you have any questions or suggestions please contact me at:
    Mr3d.CS@gmail.com


    Christian :)
     
    Last edited: Oct 16, 2016
  2. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    17
    Hi SkyCod8 ,
    thanks for you fast response! :)

    There will definitely be Updates to further improve performance etc. ..

    Do you have a special aspect in mind for further development?

    edit: I don`t know what happend to SkyCod8`s reply.
     
    Last edited: Dec 10, 2016
  3. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    17
    Hi,
    i know that this is my first ever post on this forum.
    But the main reason for this is that i`m usually active in german Unity-Forums.
    ( http://forum.unity-community.de/user/2869-mr-3d/ ) :)

    To the second point im not too sure..
    in the process of writing this promotion i accidentally clicked the "post" button too early.
    I actually have added a showcase video and screenshots afterwards.
    ( additionally i have two introduction-tutorials on my channel HERE )

    But you are right.. i will add additional information to the main post soon! :)

    Christian
     
  4. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    17
    Yes ^^

    so i have added some more information and screenshots. :)

    You like it more now?
     
    julianr likes this.
  5. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    17
    I also want to point out to these two videos i made when you want a closer look at how the asset works behinde the scenes. :)





    btw. what happened to SkyCod8`s replys?
     
    Last edited: Oct 20, 2016
  6. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    17
    Hi,

    i have just realized that the WebGL demo-export ran in debugging mode.

    If you have experienced stuttering it should be gone now.
    And general performance will be a lot better! :)

    Demo: https://misterdreid.itch.io/bulletballistics
     
  7. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    17
    Hey everyone,

    Update 1.01 is out now! :)

    It fixes a few small problems of the first Version and also features a reworked methode for handeling your weapon-input.
    Performance will be a bit better too!

    I have also created new models for the demo scene. ( they are pretty bad though.. ^^ )

    I hope you like it!

    >Click<

    Christian
     
  8. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    17
  9. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    109
    Hey! First off, this is a super cool asset! I've been having a lot of fun with it and experimenting with it quite a bit.

    One question I have though is that bullets appear to penetrate surfaces but are destroyed the frame immediately after. It's like their physics overshoots where it was suppose to stop. Have you ever noticed this?
     
  10. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    17
    Hey local306,
    I am very glad you like it!

    I believe you mean something similar to this:
    img.PNG

    .. it is just an inaccuracy of the bulletpath -visualization.

    I could fix it, but it would have a small impact in performance.
    Please let me know if you need the accurate visualisation, then I will sent it to you! :)

    Greetings,
    Christian
     
  11. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    109
    I see, so it's purely the visualization part then?

    If it's not too much trouble for you, I wouldn't mind checking out a build with more accurate visualization. My current idea doesn't require a tonne of bullets flying everywhere, so overhead shouldn't be too much of a problem.
     
  12. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    17
    I have sent you a pm :)

    I will propably include this the next time I update the package.
    If anyone else needs this before the update, just contact me through pm or mail ( mr3d.cs@gmail.com )

    Greetings,
    Christian
     
  13. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,107
    Can this be used for large caliber systems, and not just small caliber bullets eg up to 16inch shells used in large battleship turrets.
    Also does this simulate rifling where the shell spins as it exits the barrel for stability in flight, which also causes the shell to travel to the right in flight.
     
  14. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    17
    Hey John-G,

    yes, you should be able to use pretty much every type of bullet.
    You just have to figure out your speed and drag values etc.

    Rifling is something that I have ignored sofar. Because there is nothing that would cause instability in the flight, apart from wind, and it is very unlikely anyone playing the game would notice the difference.

    The bulletdrift to the right on the other hand is something what could be noticed..
    As far as I understand it, it is pretty much only a small force applied perpendicular to the flightdirection ( and gravity )
    If you know that your bullet moves for example 10cm right per 1000m flight, you can approximately calculate this drift force. Of course this solution is not 100% perfect, but I doubt anyone will every notice the difference.
    To implement this force in the calculations should be very easy. Just contact me through pm or mail ( mr3d.cs@gmail.com ) if you need this.

    Greetings,
    Christian
     
    John-G likes this.
  15. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    280
    loving this package but i have problems using it in the package
    as it conflicts with other packages that use unity.tools (or tool)
    whats the best way to namespace the scripts?
     
  16. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    17
    Hey Arganth,

    I am not 100% sure which kind of conflict you mean.

    I guess your problem is, that you are having two 'tools.cs' scripts in your project?

    The easiest way to solve this would be to remove my 'tools.cs' script. It pretty much only contains one method wich can be moved to the 'WeaponCustomInspector.cs' .

    I will send you an updated package through pm.

    Please let me know if this did not solve the problem.

    Greetings,
    Christian
     
  17. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    179
    Will this work in HDRP?
     
  18. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    17
    I dont see any reason, why it should not work with HDRP.
    HDRP only changes the rendering and nothing about the physics as far as I know.