Added new action script, which creates random movement for a missile.
Added new demo scene to showcase that behaviour.
Update 1.2.1 (hotfix) out now! Note: The fuel feature in 1.2 is currently broken. Until the hotifx is online please refer to this post for a fix.
Update 1.2 out now!
Changelog
Now compatible with Unity 4.6 & 5.0
Reworked lots of things:
Every class now has tooltips.
Completely redone demo scene.
Every action script is now also a trigger.
Redone ReadMe.
The Explode action script now has a variable to introduce a delay to the destruction of the gameobject.
Added more comments to some scripts.
Added the new SpawnSwarm action script.
When triggered this script will spawn a number of prefabs around the missile in a radial pattern.
Added five new prefabs which all use the new SpawnSwarm script to show you how it works.
Update 1.1 out now!
Changelog
Added fuel feature
Added the new SearchForNewTarget action script.
This script is a trigger and an action at the same time.
When triggered it will search for a new target within a certain range.
If it can not find a target it will fire an event itself, which you can use the same way as any other trigger script.
Missile Behaviours is a little package that does what the name implies. Currently its main focus is the guidance of missiles, but it already includes some other goodies. The current features include:
Proportional Navigation based guidance, which creates an intercept course which allows it to hit even dodging targets with ease. It includes the normal algorithm and the augmented version.
A second guidance script which uses the more common approach of simply rotating the missile towards a target. Since this approach has a fairly bad hit rate for moving (let alone dodging) targets the script also comes with an option for an expertimental improvement to this approach.
The scripts are build in a modular way which allows you to swap out any part with your own implementation if you wish to do so. This is however a little experimental and will be improved with growing feedback.
Additionally this package comes with an event based trigger & action system. A ‘trigger’ is any script which waits for a certain condition and fires an event once that condition is met. An action script can then pickup any number of these events and react to it. This allows you to, for example, trigger an explosion when the missle collides with the target, comes too close to something or loses its target. Among plenty of other things.
The goal of this package is to provide you with everything you’d ever need for your missile based destruction fantasies. My hope is that the feedback of you guys will give me plenty of new features to add over time.
Looks legit! Needed something like this about a year ago and mocked up my own Proportional Navigation. Wish I had a better solution back then. Might be picking this up, looks great!
Could this work in 4.6?
I would love to see a little more noise on the missile travel path. Puffy smoke. An store product had some short of crazines value in a missile demo that looked very nicely.
Unfortunately converting it to 4.6 is a lot harder than expected, because basically everything breaks. However it’s mostly limited to the demo scene, the scripts itself should work. But before I can upload a package for 4.6 I’ll have a lot of fixing to do so that’ll take a while.
As for the wobble, I’ll see what I can do. Might be a lot trickier than it sounds but I’m sure it can be done, I’ll look into it.
I’ll also look into uploading a demo once all this version shenanigans are worked out.
Sorry for the delay, I didn’t expect so many things to break with 4.6.
Ok no problem then. May be I’m the only potential customer working on 4.6 so unless there is a public don´t focus too much on it if it takes so much time. But htanks for trying.
There might actually be quite a few people still on 4.6. Guess we’ll find out when the new statistics come out. 5.0 did change a lot of things from shaders to code. And I believe the missing shaders are what’s breaking everything. Maybe there is a way to import 5.0 shaders into 4.6 so that stuff doesn’t break. Then it might be far easier to maintain both versions. If however everything breaks again with each update then maintaining both versions might become too much. I don’t know. Again, I’ll look into it but I can’t promise anything since I’m not 100% certain on what’s actually broken and what isn’t yet.
I’d be very interested to hear from other people if maintaining a package for 4.6 or even lower is a good idea or not. Because as far as I’m aware even the Unity guys themselves are moving away from versions <5, no? And one can certainly see their reasons for that.
Added a basic, optional fuel system. Once the fuel runs out, the missile will no longer accelerate.
Added a new action script which will search for a new target when triggered. It will also fire an event itself, if it can’t find a new target. This can, for example, be used to self destruct if there are no more targets in range.
Improved some minor things.
Now, as for 4.6 support. If everything goes well this will be in the next version. Even though everything breaks when importing from 5.2 to 4.6, it’s possible that this doesn’t happen when importing from 4.6 to 5.2 (other than some code errors). If this theory turns out to be correct I’ll redo the whole demo scene in 4.6 and work with that in the future. Again, I can’t promise anything but this seems to be the most promising approach right now.
Still working on the whole 4.6 thing. It’s probably going to take a little longer still. Since I have to remake the whole thing for 4.6 anyway, I decided to tighten up the whole package a bit. Essentially I’ll go over every single script again and tie up some loose ends. Additionally version 1.2 will contain at least one new script, possibly more if some cool new ideas find their way into my brain
Finally figured out how to get a demo up on dropbox (I hope…).
You can now play the demo scene in your browser, here. (Hopefully…)
This demo is from the new version (1.2) which should be going live in a few days, given how long it has been in review already.
Unfortunately while working on that I discovered two fairly annoying bugs in version 1.2. I’ll post how to fix them here as soon as that version is up. Since there seems to be no way to upload a hotfix I’m afraid the official bug fix will take another few weeks to get through review. Sorry about that
Since you said v1.2 I assume you are talking about the demo? In that scene most missiles are setup in such a way that they explode if they can not find a target. That’s the most likely explanation, because targets just spawn every few seconds. So either wait a few seconds before you spawn one, or spawn a target manually by pressing the return key.
yes sorry, forgot to mention the demo… got sidetracked. Im using Unity 5.2.0f3, there are targets, the missiles just explode before they take off. All I can think of is that it doesnt work with 5.2.0f3
Well… that’s odd. I just imported the package from the store to make sure I have exactly the same version as you do. Turns out that’s a backup version… must’ve somehow uploaded the wrong version. My bad
The good news is, it’s the most recent backup so hopefully there aren’t any other hidden bugs flying around.
To fix this open the SpawnEnemiesAndMissiles.cs and remove the lines 56-60. Which are conveniently tagged with “TODO: Remove.” being a test version and all. That reminds me, I also found out that there is still another scene in that package called “TestScene” which you can safely remove.
Sorry again, no idea how or why it uploaded that version. Must’ve opened the wrong project or something
Edit: It’s actually kinda weird that that version even got through review, now that I think about it :x