Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Head moving

Author
Message
Drakportalen
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: Sweden
Posted: 6th Nov 2003 18:32
Does any one have any example code of how to set the camera to rotate when the player move the mouse up and down and at the same time the characters head shall allso move syncronyzed. (To make the control of looking up and down).

Thanks for any help!

Jaco Pastorius painting the Portrait of Tracy...
Black Hydra
20
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 6th Nov 2003 22:10
Describe it better.

Do you want the persons head to look as though its following the mouse or have the mouse control how your looking through the camera.

If it is the first one then xrotate the object based on the xcoordinate of the mouse and zrotate the object based on the zcoordinate of the mouse.

If you want the camera to alter (first person) then use the three newvalue commands (x, y, z) to return a point in 3D space and point the camera to that. Or you could x rotate the camera when you move the mouse up and down and yrotate the camera when you move the mouse side to side.

I leave the math to you...

Login to post a reply

Server time is: 2024-09-21 07:42:54
Your offset time is: 2024-09-21 07:42:54