Spawn an entity flat on a surface?

I’m looking at the method from the keypad addon but i’m stuck.

Do a trace, get the hitnormal.

I did that but this is what I get.

This prop is standing up.


Then modify the angle, like

ent:SetAngles(trace.HitNormal:Angle() - Angle(90,0,0))

or something.

You will need to modify the angle using :RotateAroundAxis, I’ve never understood it enough to explain it though.

Ok thanks, that makes sense.
Although the angles don’t seem to change no matter what.

[editline]3rd February 2014[/editline]

Ok, it finally worked when I tried using a different prop.
I appreciate all the support.