Erm. still think its wrong.

Simple example a cube in the center of the screen with random rotation XYZ.
I should then be able to place an object in front of the cube like so.

cylinder.x = cube.transform.forward.x * 210;
cylinder.y = cube.transform.forward.y * 210;
cylinder.z = cube.transform.forward.z * 210;

But that wont work, because forward uses the row not column.

Little example,
http://www.shrewballooba.co.uk/blog/wp-content/uploads/2010/09/AWCamforward.swf
click n drag
The cylinder uses row,like the matrixAway3D class (szx,szy,szz)
The sphere uses column (sxz,syz,szz)

-R-|-U-|-F-|-T
sxx sxy sxz tx
syx syy syz ty
szx szy szz tz

On 5 September 2010 00:19, Rob Bateman <[email protected]> wrote:

> John: I'm afraid that the notation there is written as S: row : column.
> just to be extra confusing. ;)
>
> Stephen: I'm afraid i don't follow you example code - the multiply function
> should be used with two matrix arguments, outputting to the transform matrix
> object?
>
> Rob
>
>
> On Wed, Sep 1, 2010 at 8:37 AM, Stephen Hopkins <[email protected]>wrote:
>
>> Hm. I have a similar problem with forward. Shouldnt doing this give
>> you essentially the same thing?
>>
>> var direction:Number3D = new Number3D(0, 0, 1);
>> transform.multiply(direction);
>>
>> transform.forward should have the same values as direction, no?
>>
>> When I trace the values, the sign is flipped for x/y, or they are both
>> different, but the z remains the same in both Number3D's. Maybe there
>> is a problem like the original poster said, as the zz value is the
>> only one correct.
>>
>> On Aug 26, 3:30 am, John Brookes <[email protected]> wrote:
>> > Yes no?
>> > Talking out of wrong hole?
>> >
>> > On 25 August 2010 10:46, John Brookes <[email protected]> wrote:
>> >
>> >
>> >
>> > > Shouldn't these be column vectors, not row?
>> >
>> > > eg
>> > > /**
>> > > * Returns a Number3D representing the forward vector of this matrix.
>> > > */
>> > > public function get forward():Number3D
>> > > {
>> > >     _forward.x = sxz; //szx;  wrong?
>> > >     _forward.y = syz; //szy;  wrong?
>> > >     _forward.z = szz;
>> > >     return _forward;
>> > > }
>>
>
>
>
> --
> Rob Bateman
> Flash Development & Consultancy
>
> [email protected]
> www.infiniteturtles.co.uk
> www.away3d.com
>

Reply via email to