How to get Raycast surface normal to align particle system?

Hi there.

Setup is this: I have a particle system, that displays correctly when set to Euler rot (270,0,0).

Now what I want to do is raycast through my camera center and instantiate the particle system where the ray hits, however the particle system needs to be aligned with the surface it’s instantiated on.

By aligned, I mean it’s “upward” axis should be parallel to the surface’s normal.

My code currently only spawns it facing “upward” in world space, mostly because I dont know how to rotate it the way I want it to be:

if(Input.GetButtonDown("Fire1"))
		{	
			RaycastHit hit = new RaycastHit();
			if(Physics.Raycast(Camera.main.transform.position, Camera.main.transform.forward, out hit, 50.0f))
			{
				Instantiate (boom, hit.point, Quaternion.Euler (270,0,0));
			}
		}

(It’s supposed to be an explosion into one direction, so it needs to explode/face away from the point of detonation)

Try to check RaycastHit.normal

I did not try but it could something like this

Instantiate (boom, hit.point, Quaternion.FromToRotation(Vector3.up, hit.normal));