# \[papervision\] Align object to a face

**URL:** <https://forum.kirupa.com/t/papervision-align-object-to-a-face/288074>\
**Category:** flash\
**Created:** [May 10, 2009, 10:16pm UTC](https://forum.kirupa.com/t/papervision-align-object-to-a-face/288074 "2009-05-10T22:16:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![braxius](https://avatars.discourse-cdn.com/v4/letter/b/8797f3/32.png) [@braxius](https://forum.kirupa.com/u/braxius)\
**Post date:** [May 10, 2009, 10:16pm UTC](https://forum.kirupa.com/t/papervision-align-object-to-a-face/288074/1 "2009-05-10T22:16:22Z")

</div>

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:

```auto
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

```auto
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.
