Parabola Style Laser

Hello,

I would like to create the “bezier style laser effect”, like the most of the games to fire bombs, items or put on a target at some enemy.

The effect I’ve seen it with particle system and simple lines … anyone know how I could do it?

I have images with the example!

Thanks,
Deo.

I want to do it’s the Parabola with a Height, the effect I watched with particles and just with a simple or animated texture, but the main idea it’s lear how to create by scripting the parabola …

Here are the videos with References about the parabola effect:

Rochard: - YouTube

1:20min Partcle Parabola Energy.
1:40min Parabola with a Animated Texture.
Rachted & Clanck: Ratchet and Clank: All 4 One - Episode 11 - YouTube

4:30min Parabola throwing bombs.
Thanks,

Thank all of you guys,

The main idea it’s create a Parabola with Start From (Player) to Target (Enemy Pos), with a Height in where the player can throw a Bomb with the trayectory of tue Parabola, and this parabola we can move it dynamically draw it with a animated or simple mataerial.

I don’t know if in Rochard Game when use Energy that Ray are particles or just a Render Line, but the effect it’s super nice, but in this case I just want to know hot to do it with a animated or simple material.

What do you think about it.

Thank you so much for any Help! :slight_smile:

Deo

[6177-bezier+laser+rachted&clanck.jpg|6177]
[6178-bezier+laser+rochard.jpg|6178]

I have been playing with this like I said…

my project is not very pretty yet, and I am still not sure exactly why I had to hedge my vertical rotation… but here is a sample project which I am currently still working on:

https://dl.dropbox.com/u/11203897/MyTester.rar

open the scene and hit play, then use the arrow keys to rotate around (up,down,left,right), and space bar will revolve the camera… This all works… though I had to add one value to my equation which I still don’t get…

take a look, and I will keep playing with this,and update if I figure more out…

if you select the Cylinder in the hierarchy, you will also be able to adjust the projectile velocity dynamically, as well as the gravity, or the number of points of the line.

(I also added a sample platform to demonstrate how to shorten the line if it hits something)

:slight_smile:

EDIT:

UPDATED ----

pressing space will now launch a projectile with the initial direction/velocity (and will also update the project gravity if necessary), in order to demonstrate the ACTUAL project rigidbody physics versus my approximation… you will see it is pretty close, but not PERFECT… as @Bunny83 mentioned before, predicting EXACTLY would be tricky… (though if anyone can see how to fix my math, please do tell…)

however, we would really want this to be exact (generally) for the game, so it’s better to just use the plotted trajectory… since it’s pretty darn close, it’ll look ok… to launch a TARGETED projectile, press “x”. This gets passed the actual array of points which we are already using to draw the arc, and then uses those as waypoints, so we KNOW it will ALWAYS be exact.

I didn’t bother to fix the minor glitches, it’s enough to get the idea…

UPDATE:

the project in the link is updated, just added some sample textures and a simple editor window to adjust things… just use file bar > Window > Laser Trajectory .

I will probably update this (at least) one more time when I feel like it, at which point I’ll post it on the wiki (with a link here)… for now, just thought I’d post my progress :slight_smile: