You can simply copy the ground matrix to your object dropping the position members.
On Wed, Apr 6, 2011 at 1:51 PM, John Brookes <[email protected]> wrote: > Not quite got this right. > > If I want the child to be parralel to the ground while looking at a > position. > Whats the up axis? > > eg > http://www.shrewballooba.co.uk/childLookAt/ > small trident = container > large trident = child > Right side is what I want it to behave like. (that version doesn't have > children) > Left side is container + child > > using > lookAtVector = new Vector3D(0, 0, 500); > > var m:Matrix3D = container.transform.clone(); > m.invert() > lookAtVector = Matrix3D(m).transformVector(lookAtVector.clone()); > childObject.lookAt(lookAtVector); > > > -- Michael Ivanov ,Programmer Neurotech Solutions Ltd. Flex|Air |3D|Unity| www.neurotechresearch.com http://blog.alladvanced.net Tel:054-4962254 [email protected] [email protected]
