• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by JeppeNygaard · Dec 13, 2012 at 02:28 PM · particles1st personrays

how do I create a Ghostbusters beam

Hi All,

I have a very open ended question for you and I hope someone can help me. I'm currently developing a game which is similar to a 1st person shooter, but instead of shooting guns we're shooting rays which we hope will end up looking similar to the Ghostbusters rays

please see this link for ref (at the 1:22 mark) https://www.youtube.com/watch?v=YUQeL5E6-w0

My question: should I pre-render this effect in my 3d package and map it on planes inside Unity (1 plane per ray) or is there an draw-call-efficient solution to create this dynamically inside unity?

looking forward to hearing your thoughts!

Thanks Jeppe

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlucardJay · Dec 14, 2012 at 06:22 AM 0
Share

I think this would be possible with a procedural mesh, 1 drawcall but maybe a little expensive to calculate/render. Imagine a straight line between the player and the target, then divide that line into lots of connecting lines, imagine where each cut in the line is a node :

  |----|----|----|----|----|----|----|----| <- nodes

Find how long the beam is, calculate where you want 'nodes' and how many for the lightening to change direction (zigzag). Generate a mesh with 3 quads between each node, and update their verts to an offset with perlin noise, eg the first node goes up a bit, the second node goes right a bit, the third node goes forward a bit , etc etc =]

avatar image AlucardJay · Dec 14, 2012 at 07:36 AM 1
Share

Something that works very similar to what I am describing can be seen in this free unity package, Procedural Examples : http://u3d.as/content/unity-technologies/procedural-examples/3zu

avatar image JeppeNygaard · Dec 16, 2012 at 09:37 PM 0
Share

Thank you alucardj - this was very helpful - just the the example I was looking for!

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by kaiserkappel · Dec 13, 2012 at 05:29 PM

Maybe you could play around with Unity's particle system and see if it gives the desired effect? I'm currently following one of their tutorials that you can download from the asset store (download "3D Platformer Tutorial" under the Complete Projects tab) and in the accompanying PDF starting on page 22, they discuss some of the particle effects that are in Unity. I wouldn't be surprised if you could play around with it and create a beam-like particle and then script the accompanying damage effects of it. But I'm just speculating so I hope it helps.

EDIT: Also found this for Particle Collision detection: http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.OnParticleCollision.html

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity inbuilt distorsion shader? 1 Answer

Best way to spread particle system? 1 Answer

How can I recreate the filled Ultimate Meter in Overwatch? 1 Answer

Change value when swiping on mobile 0 Answers

Particle system acting weird 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges