ScriptSpot

Forum topic · General Scripting

object rotation according to a face normal

By MrGAG · 2007-11-11

Description

hi ,

I want to make a script to lay down a collection of object on a noisy floor
I partially do this by definig a ray and position my object at the intersection. This part works well. My problem is rotation of my object.
I would like to find a way to rotate my object accordingly to a face normal, for my object is perfectly parellel to this face.

Does anybody have a clue ?

Comments (1)

schaf82 · 2007-11-16

Hallo MrGAG

 If you open up your maxscript helpfile and look for

How do I align the UVW_Modifier's Gizmo to a selected face?

 your problems should get solved..

and since your intersectRay gives you the face_normal you shoudl have alle information you need

 maeh maeh

schaf