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.

AppGameKit Classic Chat / GetCameraAngleX(1) defaults to 26.565?

Author
Message
ICERGB
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 22nd Apr 2017 10:17
Shouldn't Camera angle x default to 0?

but it's defaulting to 26.565

Just curious as to why, because if we build on this, it could make a big difference if they change it in the future?

programming is ace
User Banned
Posted: 22nd Apr 2017 10:21
Not sure,

Wouldnt it just be simpler to reset the camera before the loop starts

SetCameraPosition(1,0,0,0)
SetCameraRotation(1,0,0,0)

do
...do stuff
sync()
loop
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 22nd Apr 2017 11:52
I haven't used 3D yet, but is it because the camera is set back in the scene (on the Z-axis), raised (on the y-axis) and pointing at 0,0,0?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
PSY
Developer
8
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 22nd Apr 2017 16:16
Haven't used 3D yet,

but your cam is at ( Y10 | Z-20 ) and looks at 0,0,0, so atan ( 10.0 / 20.0 ) = 26.565050

I guess that's the reason
PSY LABS Games
Coders don't die, they just gosub without return
29 games
19
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 22nd Apr 2017 23:19
I do use 3D quite a lot and I've never noticed this before but that's because I always explicitly state where I want the camera to be and it's orientation, as suggested by programming is ace. It does seems a little odd.

I think this is only really be a problem if you use some kind of relative movement to position and orientate (such as the movecameralocal or movecameraglobal cammands) the camera at the start.
Hover Car Race Challenge! - available now on Google Play
Invaders of the 29th Dimension - available now on Google Play
Find me on indieDB
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 23rd Apr 2017 00:53
As 29 games says. I always assume control of the camera and never noticed. PSY's explanation confirms that you shouldn't assume the camera's position or angle - just set it to a known condition.

Login to post a reply

Server time is: 2024-11-24 16:39:44
Your offset time is: 2024-11-24 16:39:44