BLOOD, BREATH & SWEAT & swears F%*$#$@!*;^%!!!!!

The setting is a winter scenario. I am trying to create footprints in snow, ice breath and periodically a blood trail on top of the footprints. I know that there is a package out there for a winter game walk-through but I want to build this from the ground up to learn Unity. I am a game artist and not so great at c# or JavaScript but I can muddle through it. I was looking at the “projector” in Unity and also considering Trail Renderer or Line Renderer but I am new to Unity and have been struggling. I thought maybe a texture with an alpha channel and a bump map would do the trick but I quickly realized that I need 2 at different locations and intervals and they need to disappear after a segment of time has passed. I tried a projector but it seems to be tied to the First Person Controller. If I could delay the projector and have it follow the FPC while projecting a texture material it might be an easy solution. But, I have got a feeling that this is going to take some complex code tweaking. I think the breath could be easier using a particle emitter tied to the FPC? But I am just speculating as I have only worked with Unity for a few hours. I would be grateful for any suggestions or ideas from my skilled and knowledgeable colleagues here at Unity Developer Network.

(addendum)
I have very little programming skill but I’m a quick learner. I’ve worked with AS3 and simple 2D physics in Flash and I can pick apart the scripts. It seems like a difficult problem but I am hoping I don’t have to go to school (computer science) for eight years to accomplish this effect. I am willing to work and I am pretty smart, just don’t know where to begin and what method might be most efficient.

Thank you.

Tony

This would take a little while to provide code so I will only give you some headlines.

As stated in comments, you are heading into hours of headache if you do not know much about programming.

Your footsteps could be done using the animation event

http://docs.unity3d.com/Documentation/Components/animeditor-AnimationEvents.html.

Since you are a game artist, I reckon you are familiar with animation.

All you need to do is add a function when the foot animation curve is at the lowest(touching ground). Then you create a footstep texture that you apply flat on the ground at the foot position. Same for the bloody one, you just swap the material. You can use the Destroy function to remove your footsteps as the function has a timer in seconds.

The function below shows the principle with the mouse position, you just need to change for the foot position. Click left button to apply a “step”, wait for 5 seconds and pooof…it is gone.

var step:GameObject;
var bloodyStep:GameObject;
var ok:boolean = true;

function Update(){
	if(Input.GetKeyDown(KeyCode.Space))ok=!ok;
	if(Input.GetMouseButtonDown(0)){
		var ray : RaycastHit;
		        if (Physics.Raycast (Camera.main.ScreenPointToRay (Input.mousePosition),ray)) {
		            if(ok){
			            var steps=Instantiate (step, ray.point, Quaternion.identity);
			            Destroy(steps,5.0f);
		            }else{
		            	var blSteps=Instantiate (bloodyStep, ray.point, Quaternion.identity);
			            Destroy(blSteps,5.0f);
		            }
		        }
		}
}

[3729-unity.zip|3729]

You can try a very simplified version with the link at the bottom. Press space to swap colors.

For the breath, you use particle emitter that is position on the front of the mouth.

http://docs.unity3d.com/Documentation/Components/class-EllipsoidParticleEmitter.html

Unity has two particle system, legacy and shuriken. I would recommend legacy to start with. Shuriken has so many parameters that would get you lost.

I would tell you to start and look for all those and when you hit an issue come back here.

fafase has good advise.

You might also apply Decal textures for both footprints and blood. If you use a parallax shader with height you can get a pretty nice ‘impression’

Thank you! thank you Fattle and Dave. And thank you for considering my “right brain” visual thinking mind. I think that I can do this and I appreciate the advice very much. Well, here we go…

I’d use a particle system that collides with your ground and uses gravity.