smoke particle on point of collision

hey guys i want to ad a smoke effect to my bullet when it hits somthing how do i do this?? can u please be specific about it becouse i realey dont know notning aboute raycasting or decal and stuff thanks

You dont need any fancy stuff really.

var smokeEffect : Transform; // Particle effect goes here.

function OnCollisionEnter (hit : Collision)
{
if(hit.gameObject)
   {
   Instantiate(smokeEffect,transform.position,transform.rotation);
   }
}

Attatch this script to your bullet and it should work. Remember to drag the smokeEffect in to the empty slot in the Inspector.

Heres one. I use raycast for my guns so this should work.

if (Physics.Raycast (gunPos, direction, hit, bulletRange)) {
        //Check if we hit something
        if (hit.rigidbody){
            // Apply a force to the rigidbody we hit
            hit.rigidbody.AddForceAtPosition(bulletHitForce * direction, hit.point);

            //Send a message to the hit object so its aware that is hit so it can take apropriate action
            //like applying damage to itself
            hit.collider.SendMessageUpwards("ApplyDamage", bulletDamage, SendMessageOptions.DontRequireReceiver);       

            //If show Gizmos is turned on you will be able to see a red line between the gun and the hit object
            //this is for debugging purposes only
            Debug.DrawLine(gunPos, hit.point,Color.red);
        }
        //Show spark where bullit hit
        if(Smoke) //Check if the object exists
        {   
            Smoke.transform.position = hit.point;
            var rotation = Quaternion.FromToRotation(Vector3.up, hit.normal);
            var Smoke: GameObject = Instantiate (Smoke, hit.point , rotation);
   }
}

(Included other part of script inside my weapon script to show my placement)

Peace, Aaron Lewis

Note: You need a GameObject called smoke at the top of your script.