Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

3D Homing Missiles [Released]

Discussion in 'Assets and Asset Store' started by gamedevassets-sean, Nov 14, 2014.

  1. gamedevassets-sean

    gamedevassets-sean

    Joined:
    Jul 26, 2013
    Posts:
    76
    Hi all,

    3D homing missiles is now live on the Unity Asset Store. You can get it here: https://www.assetstore.unity3d.com/#!/content/25138

    Web demo

    Try the web demo here: http://hobbyistcoder.com/demos/3DHomingMissilesDemo/3DHomingMissilesDemo.html

    What you get in the asset

    • Proportional constant homing missile script for 3D missiles + supporting scripts
    • 3D Missile model, texture and missile prefab (template)
    • Free explosion audio effect and basic explosion particle effect
    • Free "Starfield Space" Skybox bundled in (2048x2048px textured)
    • Smoke/fire particle effect trail for missiles
    • Demo scene to demonstrate dynamic instantiation of new missiles along with two different camera views, missile contact/explosions






    Details on the asset

    The 3D Homing Missiles asset for Unity gives you realistically moving missiles to use in your games and prototypes along with smoke/fire particle trails.

    With the 3D Homing Missiles asset, a special proportional controller algorithm is used to move missiles intelligently, instructing missiles to reach their target, rather than just move directly to their targets. A desired state is constantly fed to each missile's controller, as their targets move, steering the missiles in the right direction in order for them to reach their targets with realistic flight paths. This results in super realistic (and entertaining to watch) missile patterns. Fire single missiles off, or send out a swarm of missiles, and watch as they dynamically track down and realistically intercept their targets.

    To use them, all you need to do is add them to your game scene, and set their target property. Missiles can also have a "usesFuel" boolean flag set to enable them to use fuel, which is controlled by a float value you can optionally set. Once they run out of fuel, they will detonate. Missiles also have an optional flag to set, that when enabled, will ensure they destroy the gameobject they collide with.
     
  2. jtok4j

    jtok4j

    Joined:
    Dec 6, 2013
    Posts:
    320
    This is a well-though-out package, which looks to be a good bargain.

    I love the fact that you can have them run out of fuel and explode.

    Perhaps to enhance it's value even more, you can provide other textures for the model's design, and also different shapes of missile? (Who says it even has to be a traditional missile shape? Could be a homing hummingbird which screams as it reaches the target, or a mudball which falls apart ? )

    Nice work!
     
  3. gamedevassets-sean

    gamedevassets-sean

    Joined:
    Jul 26, 2013
    Posts:
    76
    Those are some great ideas you haave there jtok4j, thanks for the feedback! I'll have to have a think about how I could expand on those with this asset. I had help to create the missile model (3D modelling isn't my thing!) so will see what options I have going forward.
     
  4. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,114
    Control surfaces that move corresponding to Movement would be a nice addition.
    Also can speed and turning circle be defined by the user?
     
  5. gamedevassets-sean

    gamedevassets-sean

    Joined:
    Jul 26, 2013
    Posts:
    76
    Hmm, the control surfaces sound interesting but would be locked to certain model types I guess. I'll add that to my 'nice to haves' list for future.

    The turning circle and speed of missiles is customisable - you just simply adjust speed and proportional constant values - you can try it out in the web demo if you like. The higher the proportional constant value is, the more 'performant' missiles are - they get tighter turning circles and re-act quicker to target movement/direction changes. Speed of course affects overall speed. Quite fun to actually play around with the values for different kinds of missiles :)
     
  6. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    I would preferred you have separated the movement part from the missile part so we can put in our own missile logic.
     
  7. gamedevassets-sean

    gamedevassets-sean

    Joined:
    Jul 26, 2013
    Posts:
    76
    Hi imtrobin,

    Could you elaborate a bit on what you were thinking? Perhaps I could then suggest a way for you to achieve what you are looking for?

    Currently the missile controller script sits on the base missile GameObject, and controls things from there. There is a nested GameObject hierachy that sits below the missile GameObject which allows the Missile controller script to rotate the missile model accordingly, (and handle the smoke trails correctly when the missile detonates).
     
  8. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    I mean separating the missile logic from the movement controller, so it can be reused in other areas easily.
     
  9. gamedevassets-sean

    gamedevassets-sean

    Joined:
    Jul 26, 2013
    Posts:
    76
    I guess you mean the logic of the missile for fuel usage and destruction opposed to the movement logic? That is actually fairly easy to separate.

    All you really need to do is create another C# script, pull the code that removes fuel from the fuel float value and the OnTriggerEnter and GracefullyDestroyMissile methods and put them into another script - then attach that script to missile prefab, rewire a few of the public fields that need to be rewired and you'll be good to go. The MissileController script will continue to provide the PID controller movement to the missile and the new script will handle destruction of the missile when it hits targets, as well as fuel consumption (if enabled).

    If this proves to be a popular request then I can definitely update the asset to provide a more granular modular script approach.
     
    John-G likes this.