- Home /
how to make a obduction beam in unity?
Title says most of it. Anyways, I'm wondering how would I go upon making a cone-like beam that emits light and looks cool, also raycast on the floor and determine where ground is to prevent beam from going throught objects. Also maybe somehow add gravity on the particle effects? So when the ship moves theres gravity acting upon the beam.
Answer by Cryptonyte · Apr 30, 2018 at 06:39 AM
I'm not so sure on how to make the beam look cool, but for the gravity, you could use a game object to act as a trigger, so when this game object collides with something, add an upwards force until it reaches the ship. As for the particles, there is a gravity modifier in the particle system (Inspector View). You can do this with:
https://docs.unity3d.com/ScriptReference/ParticleSystem.MainModule-gravityModifierMultiplier.html
If you have any more questions, ask away! :)
ok there are some problems here. 1. The upwards force when going forward wont make the particles go up in time, i dont want to add -10 Y force to it, because it will act like lightning. 2. This isn't a really good way of looking at it, a more optimized way would be writing code. Im sorry, im not trying to be rude to you but, is there a way you could try to add code to it? like e.g add a raycast below an object at a max distance to deter$$anonymous$$e if the particles can collide, if they can collide we should delete them, or completely stop them. Again, this would be a better run at it. i dont want to have too many triggers for my ship.