Hi everyone. I am awful with Quaternions! Basically, I am spawning a blood splatter decal on the floor which is supposed to face away from the player. I am using Quaternion.FromToRotation to get it on the ground, now I just need to rotate it towards the player. Any ideas?
Here's a picture demonstration. The red box outline represents the enemy, the black line representing the bullet, and the decal which is pointing away from the player
if(Physics.Raycast(transform.position, Vector3.down, out RaycastHit hit, 10)) {
GameObject decal = GameManager.Instance.SplatterPool.SpawnDecal(new Vector3(hit.point.x, hit.point.y + 0.01f, hit.point.z), Quaternion.identity);
//decal.transform.rotation = Quaternion.LookRotation(from.transform.position);
decal.transform.rotation = Quaternion.FromToRotation(-Vector3.forward, hit.normal);
}```