A smoothed TrailRenderer meant for melee weapons of animated 3d models. Based on the TimeBasedTrailRenderer by Forest Johnson (Yoggy) and xyber. Instead of always facing the camera, it takes its shape from two points in your weapon 3d model, the base, and the tip. Source code here: http://unifycommunity.com/wiki/index.php?title=MeleeWeaponTrail
Submitted to the Asset store for easier access! @Ben4views: Yeah, its a simple script that detects only one animation to get you started, should be easy to make it detect multiple animations. You'd need to have variables for all of the start and end frames for each animation when you want the trail to appear. I suggest you make a class that holds that information and put it in a generic list or array, then have Update check each animation if its playing and check the start and end values so it knows when to turn on/off the trail.
As long as it isn't 100 over characters swinging their swords and having their animation played at the same time, i don't think there's any overhead for using this.
Interesting i have just been looking at this with Chivarly: Modern warfare on UDK. Its the same function but in different engine,
Cool script, but how does the helper script work with start and end frame setups? The emit never seems to be true even when playing the animation...
is this like this - http://www.youtube.com/watch?v=FYrkn6EFwOg&feature=channel_video_title or what is that.
I submitted this to the asset store so you can see in the example scene how its used: http://u3d.as/content/anomalous-underdog/melee-weapon-trail/2ck @gore23: web build demo here: http://dl.dropbox.com/u/25260770/MeleeWeaponTrailDemo/WebPlayer.html
So I had to figure out a different way on controlling emition but my problem now is that the trail never seems to follow the weapon smoothly sometimes...its never the same...for eg, my weapon moves in a curve but sometimes the trail makes a diagonal line? It would also be great if you explain the benefits of modifying options like min vertex distance etc... Thanks