import-bot (20211) [Avatar] Offline
#1
Re: Rotation of a first person camera
[Originally posted by author]

If you look in the Flycamera class you'll see that the arrow keys are wired up
through a relativedragger to control the camera yaw, and the mouse X dimension
is wired up through a different RelativeDragger to control the camera roll. I
think what you want is to eliminate yaw control and instead use the keys to
control the roll. In your code, after creating a FlyCamera, use
getYawdragger() to get that dragger, and use the dragger's setArrowModifier()
to disable arrow key control of yaw. Then get the roll dragger, and set its
arrow modifier to enable control of roll with the arrow keys.

If this isn't quite what you had in mind you can get all the camera draggers
and mappers and play with them until you get what you want -- you have full
control over what the mouse buttons, dimensions, keys, and modifiers control.
If you still can't get what you want, then you will probably have to create
your own flavor of camera. Just extend or copy the code in FlyCamera or
OrbitCamera, or add one camera to the other in the scenegraph, and set the
dragger controls as you need them.

Good luck
--jon


> Hi,
>
> To implement a first person camera, I started from the camera flying example.
> But I faced a problem : if I look at the floor, when I use keyboard or drag
> mouse to turn myself (like in the camera flying example), I make a rotation
> around my Y axis (relative to my local axes). In fact I want to make a
> rotation relative to the Y axis of the world scene to continue to look at the
> floor when I turn me.
> What classes of the powerful 3D UI can I use ?
> Is someone has already developped a such camera ?
>
> Thanks.
import-bot (20211) [Avatar] Offline
#2
Re: Rotation of a first person camera
[Originally posted by author]

Sorry, in my previous message, instead of FlyCamera and OrbitCamera, you
should be modifying FlyCameraControl and OrbitCameraControl. The camera
classes contain the camera actuators and geometry. The control classes wire
up draggers and mappers to the camera actuators.

--jon
import-bot (20211) [Avatar] Offline
#3
[Originally posted by bgoetzmann1]

Hi,

To implement a first person camera, I started from the camera flying example.
But I faced a problem : if I look at the floor, when I use keyboard or drag
mouse to turn myself (like in the camera flying example), I make a rotation
around my Y axis (relative to my local axes). In fact I want to make a
rotation relative to the Y axis of the world scene to continue to look at the
floor when I turn me.
What classes of the powerful 3D UI can I use ?
Is someone has already developped a such camera ?

Thanks.