Hello??? I like your homing lasers, but I can't get them implemented in my project. Could you help me there perhaps??
Unity School/Missile/Projectile System
A downloadable asset pack for Windows
This is a .unitypackage file which contains 3 demo scenes, 5 basic prefabs for projectiles (Missiles, Particle Missiles, 2 kinds of lasers, and Fish) and 2 advanced projectiles which can explode into other projectiles (a recursive missile, and a missile that bursts into particle missiles and finally lasers).
These projectiles home in on a transform object of your choosing, and can easily be fired from a object of your choosing. It's very easy to integrate this into your products.
o) Easy "Missile Launcher" script integration. Fire any number of missile with just a line of code:
if(Input.anyKeyDown) for (int i = 0; i < 10; i++) GetComponent<MissileLauncher>().launch();
o) Missiles and Launcher system have lots of customization and easy to use controls!
o) 5 Interesting basic, yet easily configurable prefabs get you off to a running start!
o) 2 advanced "Spreaders" show you how to create projectiles that fire off more projectiles after death!
o) Trails do not just disappear when object life time runs out! They slowly fade out, and then are destroyed.
o) All projectiles have a configurable life time.
o) A few demo scenes
This system was developed on Windows (10) with Unity 5.5.0f3.
If you have any comments or questsions please let me know below.
In order to download this asset pack you must purchase it at or above the minimum price of $2.99 USD. You will get access to the following files:
Log in with your itch.io account to leave a comment.
Oh, sorry for the delay in my reply. That error you're getting normally means that something is Null that shouldn't be, or that it's not seeing something that it's calling. It's kind of a vague error. Could I get a screenshot of how you have your object MissileLauncher set up?
Oh great, thanks for the quick reply! I was already scared the site was abandoned, due to the total lack of comments here. Anyway, I will try to describe my project settings. The error that I posted I don't get anymore now though. Not sure what i did there. Currently I have the problem that the lasers don't target my enemies. Here is a screenshot of the settings: http://imgur.com/a/uDJYq
I basically just took the CSpawn from your demo setup and made it a child of my PlayerObject. And also took the Target object from your demo and made it a child of my enemy object prefab. It's right in the middle of the enemy object. I can shoot the lasers with "M", but they do not target my enemies. They just always shoot at the same place (kind where my player object spawns. I also use an enemy wave spawner, which lets me spawn multiple enemies of a prefab from the top of my screen, but I doubt this has to do with this. Otherwise it works fine for me.
Ok, so that would be my current set up. HOWEVER, I actually would wish to use your homing lasers in a different set up. This set up would be much more complicated though, and I doubt you really want to help me there setting this up. The thing is, I actually already use a guided missile system in my project (which I turned off for the described above though), and this system uses stuff like targeting multiple enemies with a keypress, and then being able to shoot if they are in a certain radius which you can manipulate.
I actually like this system very much, but I just dislike how the lasers look there. Your lasers just look way cooler. Especially also because they fade out and are much smoother. Mine just instantly vanish when the tip reaches its target (the parent gets destroyed) and just look pretty cheap (I just use a trail renderer for them).
Would you also be willing to help me implement this into my actual other system? I also could transfer you some more money for this to your paypal if you are able to manage this. However, my other guided missile/laser system really has a lot of complicated code (I didn't write this myself though).
Edit: I just noticed I can actually use your laser for my guided system, ie it's possible to just put the CLaser prefab in the "Missile" slot of the other guided missile/laser system I have. I can shoot the laser, and also target enemies (with the target system from my other missile system), but still, your laser just doesn't shoot at the enemies. It just always aims at the position coordinates of the enemy prefab (0/0/0). If I change these coordinates it shoots at the new coordinates. But my enemies don't have the same coordinates as their prefabs. They spawn from a spawner and move around. Even with the Target object from the demo as an enemy it just doesn't work. Any idea what I do wrong there?
Edit 2: I doubt though, that my target radius system will work with your target system. The way the targeting in my project works is that every enemy has a target check script attached to it, and when I press a certain key, the player can target an adjustable amount of enemies in an adjustable sized radius. Your target system just checks for a prefab and that's it. Would it perhaps be possible that you combine your laser with this target system when I send you the right scripts?
Hi, sorry for the late reply again. I was making a new demo scene that should help out with what you're looking for, if I'm understanding it correctly. This new scene lets you spawn enemies with E and then fire missiles from the player to the newly spawned enemies with T. It should let you download the new version without paying again, but if it tries to make you pay again let me know, and I'll try setting it up differently. Sorry, I'm new to itch.io when it comes to selling things.
Hello, I am still very new to Unity and I can't get this to work. I always get an error saying "NullReferenceException: Object reference not set to an instance of an object". I get this from the script with "just 1 line of code". I attached it to the player.
Can you perhaps explain a bit more in detail how to set this up?