camera.moveForward, etc not in lite?

36 views
Skip to first unread message

Joseph

unread,
Oct 13, 2009, 4:29:14 PM10/13/09
to away3d.dev
I used

camera.moveForward(N), camera.moveBackward(N), camera.moveLeft(N), etc
with Camera3D

extensively in away3d (heavy?) but lite doesn't like it ... is it
still available?

Joseph

unread,
Oct 14, 2009, 4:00:02 PM10/14/09
to away3d.dev
In case it's not obvious to others how to get around the loss:

camXdir = Math.sin(camPan * (Math.PI/180)) * stepSize;
camZdir = Math.cos(camPan * (Math.PI/180)) * stepSize;

camera.x += camXdir;
camera.z += camZdir;

where camPan is simply a variable that keeps track of the amount of
camera.rotationY done for Camera3D.

May be a better way around it but this works ...

katopz

unread,
Oct 15, 2009, 12:08:55 AM10/15/09
to away3...@googlegroups.com
Hey Joseph

you can try port code from away3d

hth


--
katopz
http://www.sleepydesign.com

Joseph

unread,
Oct 15, 2009, 5:14:12 AM10/15/09
to away3d.dev
True that. I'll give it a shot but not very confident in my
abilities ... wish me luck :)

On Oct 14, 9:08 pm, katopz <kat...@gmail.com> wrote:
> Hey Joseph
>
> you can try port code from away3d
>
> hth
>
> On 15/10/2009, Joseph <joe.coving...@gmail.com> wrote:
>
>
>
>
>
>
>
> > In case it's not obvious to others how to get around the loss:
>
> > camXdir = Math.sin(camPan * (Math.PI/180)) * stepSize;
> > camZdir = Math.cos(camPan * (Math.PI/180)) * stepSize;
>
> > camera.x += camXdir;
> > camera.z += camZdir;
>
> > where camPan is simply a variable that keeps track of the amount of
> > camera.rotationY done for Camera3D.
>
> > May be a better way around it but this works ...
>
> > On Oct 13, 1:29 pm, Joseph <joe.coving...@gmail.com> wrote:
> >> I used
>
> >> camera.moveForward(N), camera.moveBackward(N), camera.moveLeft(N), etc
> >> with Camera3D
>
> >> extensively in away3d (heavy?) but lite doesn't like it ... is it
> >> still available?
>
> --
> katopzhttp://www.sleepydesign.com- Hide quoted text -
>
> - Show quoted text -

Rob Bateman

unread,
Oct 15, 2009, 7:47:57 PM10/15/09
to away3...@googlegroups.com
Hey Joseph

alternatively, try using the native functions now supplied with Matrix3D in Flash 10:

camera.transform.matrix3D.prependTranslation(x y, z);

the prepend methods basically apply a transformation to an object before it's transformation matrix is applied. so to move forward 10, you simply do:

camera.transform.matrix3D.prependTranslation(0 0, 10);

etc etc

hth!

Rob
--
Rob Bateman
Flash Development & Consultancy

rob.b...@gmail.com
www.infiniteturtles.co.uk
www.away3d.com
Reply all
Reply to author
Forward
0 new messages