3D Visualization - Camera Orientation

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
S.T.
User
User
Posts: 16
Joined: Mon Dec 21, 2015 7:43 pm

3D Visualization - Camera Orientation

Post by S.T. »

CameraDirectionX() and the other two vectors:
Documentation says
Return value

Returns the 'x' direction vector of the camera. This value is always between -1.0 and 1.0.

Since a direction vector cannot be specified with a scalar this should return 3 components specifying the vector.

Also there should be a function to set the direction for the X axis of the camera like SetCameraXDirection(x,y,z).
Using CameraLookAt the Z axis can be specified. Then there is no need to specify the Y direction when the X and Z have already been specified. Instead of X we should have the option to set the Y axis of the camera. Mostly this would be directed parallel to the world Z axis, or upward ( if you use Z coordinate of the World perpendicular to the ground).

Thanks
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: 3D Visualization - Camera Orientation

Post by Andre »

This sounds more like a feature-request.
So moved to this sub-forum for further investigation by the programmers.
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: 3D Visualization - Camera Orientation

Post by Samuel »

S.T. wrote:CameraDirectionX() and the other two vectors:
Documentation says
Return value

Returns the 'x' direction vector of the camera. This value is always between -1.0 and 1.0.

Since a direction vector cannot be specified with a scalar this should return 3 components specifying the vector.
This looks more like a mistake in the helps files to me.
I think it would be better if the help files said something like CameraDirectionX() returns the X value of the Camera's directional view vector. The same thing could be said for CameraDirectionY() and CameraDirectionZ().
S.T. wrote: Also there should be a function to set the direction for the X axis of the camera like SetCameraXDirection(x,y,z).
It seems to me like you want the ability to manually adjust the Camera's View, Right, and Up vectors.
Not sure if I agree with adding those commands though. It can be risky because if you incorrectly calculate the vectors the scene will be distorted.
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: 3D Visualization - Camera Orientation

Post by Andre »

To be investigated by Fred or comtois...
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Post Reply