- Home /
decal rotation issue?
I've been trying to get my decals to spawn facing the player for about a week now and I have no idea how to get this working. Someone please give me a hint!
     private void OnCollisionEnter(Collision col)
     {
         if (col.gameObject.CompareTag("Wall"))
         {
             ContactPoint[] contact = col.contacts;
             Vector3 startPos = contact[0].point;
             //Quaternion startRot = Quaternion.LookRotation(contact[0].normal);
             var decal = Instantiate(splat, startPos, Quaternion.Euler(col.gameObject.transform.forward));
         }
     }
the commented out portion of the code is from the original decal script i found online, and I tried to use Quaternion.Euler(col.gameObject.transform.forward) in it's place.
If anyone knows how I can get this working, please let me know.
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                