Need help from all the math pros
Posted: May 10th, 2011, 7:51 pm
Sorry, I have another problem 
I spawn a model with the angles (0,0,0) (facing x, so its normal is (1,0,0)).
Now I want the model to be facing the same way the surface normal of a trace is.
So the model.angles should be the same as trace["normal"]
If you cant imagine what I exactly mean, my model should be like a 'shoot-decal' if you shoot at a wall,the decal should have the same angles as the wall, thus being right on the wall.
Basically I need a conversion from a normal to an angle.
For those, who dont know what a normal is:
If I make a Trace on the ground and look at Trace["normal"], it will be (0,0,1)(x,y,z), so facing upwards, the z-axis.
It would be great help if anyone could help me on this.

I spawn a model with the angles (0,0,0) (facing x, so its normal is (1,0,0)).
Now I want the model to be facing the same way the surface normal of a trace is.
So the model.angles should be the same as trace["normal"]
If you cant imagine what I exactly mean, my model should be like a 'shoot-decal' if you shoot at a wall,the decal should have the same angles as the wall, thus being right on the wall.
Basically I need a conversion from a normal to an angle.
For those, who dont know what a normal is:
If I make a Trace on the ground and look at Trace["normal"], it will be (0,0,1)(x,y,z), so facing upwards, the z-axis.
It would be great help if anyone could help me on this.
