Hello people who are reading this
Im quite desperate at this moment, as i never usually post anything in forums unless i really have to. Ive been around a web searching for an answer to this, but no luck for like 6 days.
here is my problem:
var faceIndex:int = 22;//index of a random face in a 3D object
var face:Triangle3D = my_field.geometry.faces[faceIndex];// the face of the 3D object
face.createNormal(); // creates a normal vector for the face
var my_normal:Number3D = face.faceNormal; // normal vector of the face
var my_cone:Cone = new Cone(null, 10, 100) // a 3D cone
lookTo(my_cone,my_normal);
Question: how should the code for the function
lookTo(par_object:DisplayObject3D, par_normal:Number3D):void
look like, so that after calling the function with my params, i would get my_cone aligned to the vector? preferably its point than its bottom.
Thanks for the help.
PS. I’ve tried using quaternions based on couple of examples but to no result so far.