hey ... ehm i have still some problems with the free look mode ... i`m
using springcam, to follow a small cube, to generate the free look
mode, but i have trouble with the mouse following. i think my code is
a little shitty but mybe you can help.
public function mouseMove(e:MouseEvent):void
{
if (mouseIsDown)
{
mouseMovementX =
(e.stageX - lastMouseX) * mouseSpeed;
mouseMovementY =
(e.stageY - lastMouseY) * mouseSpeed;
myEyes.yaw(mouseMovementX);
myEyes.pitch(mouseMovementY);
lastMouseX = e.stageX;
lastMouseY = e.stageY;
}
}
this is the code i`ve done by myself and it works, but its not perfect
because if i got to the edges of my scene the free look ... or the
cube ... goes crazy for a second ... you know? i think it has
something to do with 360°. I f it comes to this point it starts at 0
or 1 and so the mathematics failed right?
but how to solve this problem :-/
greetz manu
On 27 Mai, 12:15, Fabrice3D <[email protected]> wrote:
> next to the examples, you might find some answers in there as well...
>
> http://away3d.com/documentation
>
> Fabrice
>
> On May 27, 2010, at 12:00 PM, Michael Iv wrote:
>
> > Anyways I suggest you strongly to look into Away3D example applications
> > with code source , This way you will learn a lot very quickly
> > Good Luck!
>
> > On Thu, May 27, 2010 at 12:58 PM, le_unam <[email protected]> wrote:
> > aaaaah okay thanks a lot ... i tried it with ... view.z ++; and
> > something like this. i didnt know that there is an extra function for
> > moving ... thanks thanks i will try it = )
>
> > On 27 Mai, 11:55, Fabrice3D <[email protected]> wrote:
> > > camera3D --> moveForward, backward, left, right...
> > > if you have a camera defined as HoverCamera3d, its what it does, hovering
> > > around a given object in space.
> > > if you want keep this camera, just set/change/move the camera target.
>
> > > to drive your camera3D, its like any other as3 project: keyboard event
> > > triggers an event.
> > > if arrowup is pressed, then camera.moveForward(myAmount); etc etc
>
> > > no tricks
>
> > > Fabrice
>
> > > On May 27, 2010, at 11:39 AM, le_unam wrote:
>
> > > > Thank you for this informationen, i didnt know this example page. But
> > > > i think there is actually no example for my problem. There is always
> > > > looking at objects ... i know how to do that, but thats excactly my
> > > > problem ... my look is in relation to an object every time = (
>
> > > > On 27 Mai, 11:25, Michael Iv <[email protected]> wrote:
> > > >> There is no trick , look into Away examples in the trunk
>
> > > >> On Thu, May 27, 2010 at 12:22 PM, le_unam <[email protected]> wrote:
> > > >>> Hey, i want to creat a free-look-mode. i have a big room and in the
> > > >>> middle a cube and now i want to fly around this cube ... when i press
> > > >>> up i want to fly forward and down backwards. when i press left i want
> > > >>> to turn left on my own axis. i tried many manipulations ... the
> > > >>> view ... the camera ... the cube ... nothing brings the wished result.
> > > >>> is there a trick? where is the trick? how would you do this?
>
> > > >>> thanks for all answers = )
>
> > > >> --
> > > >> Michael Ivanov ,Programmer
> > > >> Neurotech Solutions Ltd.
> > > >> Flex|Air
> > > >> |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.nethttp://www.meetup...
> > > >> Tel:054-4962254
> > > >> [email protected]
> > > >> [email protected]
>
> > --
> > Michael Ivanov ,Programmer
> > Neurotech Solutions Ltd.
> > Flex|Air |3D|Unity|
> >www.neurotechresearch.com
> >http://blog.alladvanced.net
> >http://www.meetup.com/GO3D-Games-Opensource-3D/
> > Tel:054-4962254
> > [email protected]
> > [email protected]