Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Developing A Camera (View)
Topic Started: Dec 5 2010, 06:19 AM (257 Views)
the_recruiting
Elite Member
[ *  *  *  * ]
Hi All,

This is my second time round trying to learn U3D, I have to admit that last time I understood it better :( Currently this is my understanding of how to create a camera:

Variables:
X & Y
The position of where a object (or anything) is.

Z
The height of a object in the air.

Height
Is the max height of the room?

View
The view is how far zoomed in the camera is, the smaller the angle the more zoom.

Min Range & Max Range
The minimum and maximum range of which objects in the room shall be rendered.

Questions/Requests:
- Can somebody explain the variables in more detail?
- Did I understand the height variable right?
- What are some good variable numbers for a FPS camera?

Thanks ;)

P.S.
I am searching for help, if you are willing to help me learn U3D please PM me.
Offline Profile Quote Post Goto Top
 
57E
Member Avatar
Forum Leader
[ *  *  *  *  * ]
Height is how high camera is from its z coordinate.

Example if you're doing a first person game the z coordinate is at your characters feet and the height value is at his eyes.
So the good height value is relative whatever height your other objects in game are. If you're human enemies in FPS would be 64 high it would be odd if you main character was 32 high midget.

The view is usualy beter left at it's default value 90.

Can't realy say anything more about the coordinates... EXPECT:
Read this and remember it!
Edited by 57E, Dec 5 2010, 09:21 AM.

Offline Profile Quote Post Goto Top
 
the_recruiting
Elite Member
[ *  *  *  * ]
Yeah, I have began to understand that now thanks to scotty! Can some one explain rotx, roty and rotz to me, I havn't quite grasped it. This is my understanding of rot(x,y,z)

RotX: The horizontal (Latitude) rotation (movement) of the screen or object.
RotY: The vertical (longitude) rotation (movement) of the screen or object.
RotZ: The diagonal rotation of the screen or object....or is it the height of the rotation?

As you can see I am quite confused with Rot(XYZ), mainly RotZ.

Thanks ;)
Offline Profile Quote Post Goto Top
 
57E
Member Avatar
Forum Leader
[ *  *  *  *  * ]
I have to check it from manual myself. It's one of these things I newer seem to remeber right.

Posted Image

rotx -> up / down
roty -> left / right
rotz -> whatever this would be in english... It does the barell roll.
Edited by 57E, Dec 5 2010, 10:40 AM.

Offline Profile Quote Post Goto Top
 
the_recruiting
Elite Member
[ *  *  *  * ]
57E
Dec 5 2010, 10:36 AM
rotx -> up / down
roty -> left / right
Hmmm, are you sure about Rotx & Roty? I have always learnt that X was "A Cross"....get it? (hehe)
Offline Profile Quote Post Goto Top
 
57E
Member Avatar
Forum Leader
[ *  *  *  *  * ]
Quote:
 

mouse_speed = 0.1;
GetMousePos();
//Mousecontrol
rotx+=(global.mouse_y-display_get_height()/2)*mouse_speed;

roty+=(global.mouse_x-display_get_width()/2)*mouse_speed;

SetMousePos(display_get_width()/2,display_get_height()/2);

Positive.

Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply