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 / 3d off-center displaying on the screen

Author
Message
Mysterydip
7
Years of Service
User Offline
Joined: 7th Sep 2017
Location:
Posted: 12th Sep 2017 02:51
I'd like to put the 3d view off-centered. Say my game screen is 800x600 and I want it at 700x500, offset towards the bottom-left corner. How would I do this? The closest thing I see is SetCameraOffCenter, but it looks like that is for the view frustum and not actually displaying the result on the screen. Thanks
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 12th Sep 2017 08:45
SetCameraPosition?
SetViewOffset?
Click here for VR Legend of Zelda stuff
Mysterydip
7
Years of Service
User Offline
Joined: 7th Sep 2017
Location:
Posted: 12th Sep 2017 11:12
I'll give SetViewOffset a try. SetCameraPosition would still render from the perspective of the center of the screen being the center of the camera even if I offset the position in the world I think.
Mysterydip
7
Years of Service
User Offline
Joined: 7th Sep 2017
Location:
Posted: 12th Sep 2017 16:44
SetViewOffset only moved 2D elements when I tried it. SetCameraPosition sortof worked but only if I didn't care about depth of objects lining up.

Anyone have other ideas?
Mysterydip
7
Years of Service
User Offline
Joined: 7th Sep 2017
Location:
Posted: 12th Sep 2017 17:13
Turns out SetCameraOffCenter and SetCameraBounds were what I needed, but without an example I wasn't sure the values I needed to put in. I was using world coords (ie -200 to 200) when what I needed to do was use normalized values per the projection matrix (so for example -0.72 to 1). Hopefully that helps someone else

Login to post a reply

Server time is: 2024-11-24 07:49:07
Your offset time is: 2024-11-24 07:49:07