Script for a skier leaving tracks down a mountain

I’m a bit of a newbie here, but looking for this script above for leaving tracks behind my skier. I’ve got a skier going down a terrain/mesh (imported from an actual mountain via Google Earth). I’ve got a basic skier script with a character controller (and camera following him) for moving the skier around which follows the terrain (though please do post improvements to that also please). Just need some tracks behind him. BONSU: Would love to know how to spray some snow also the turns. Sharing my basic script below which hopefully can be used/improved by all. :slight_smile:

var tracker: Transform;
var speed = 3.0;
var rotateSpeed = 3.0;
function Update ()
{
var controller : CharacterController = GetComponent(CharacterController);
transform.Rotate(0, Input.GetAxis (“Horizontal”) * rotateSpeed, 0);
var forward = transform.TransformDirection(Vector3.forward);
var curSpeed = speed * Input.GetAxis (“Vertical”);
controller.SimpleMove(forward * curSpeed);

var hit1: RaycastHit;
var hit2: RaycastHit;

if (Physics.Raycast(tracker.position, -Vector3.up, hit1)) {
if (Physics.Raycast(tracker.TransformPoint(Vector3.forward * 0.1), -Vector3.up, hit2)) {
transform.rotation = Quaternion.LookRotation(hit2.point - hit1.point, hit1.normal);

}
}

}
function FixedUpdate () {
rigidbody.AddForce (-Vector3.up * 10);

}
@script RequireComponent(CharacterController)

My ideas of how to solve this in theory:

SPRAY:

snow spray should be quite easy, just use a particle system, which is linked to the character, and unhidden when the angle of the character is either >270 degrees or <90 degrees (in relation to the slope as if it was perpendicular) -i.e. cutting in to the snow on the left or right- so it shoots out to the sides.

TRACKS:
Could you have a PNG with an indented normal map so it appears to be bumped on the snow, and then transform the bottom edges of the image (slant it) every time the player is either moving left or right. (maybe have a decreasing For loop to sort out the tracking of the trail should the player decide to go straight down the mountain

Spray - use particles

Tracks - use a trailrenderer

The unity car tutorial adds skidmarks to a surface, that with some sort of snow/groove texture would probably work well.

Edit. In the package it’s called “skidmarks.js”

Ahhh of course… missed those in the menus, thanks so much. I’ve already put this together in a test… I assume attaching the particle emitter components to the skier is best, vs the mesh? Also, I can’t seem to figure out how to only have the spray emit when my skier is moving… any ideas? Thanks again!