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 / Top Camera View

Author
Message
aviles22
10
Years of Service
User Offline
Joined: 1st Dec 2013
Location: New Jersey, USA
Posted: 8th May 2014 20:27 Edited at: 8th May 2014 20:38
I want to load a 3D Model and just look straight down from the top with my camera. (Like looking straight down from the sky.)

Also, in future want to look at my 3D object from back, front, etc.

Its been a long time since I camera coded for this, did it in DB for an old horse race game I was writing to view any horse in the race from its front, back, top and back to default perspective view during the race. Unfortunately, I lost the code.


Any Code Please? I'm stumped!
The Zoq2
14
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 8th May 2014 21:51
I think there are 2 ways you could do it. Either by using trigonometric functions which might be better but a bit cleaner. Or you could use the rotate and move local commands in agk.

I would do something like this



You can do this for any angles you want and any offset you want

Say ONE stupid thing and it ends up as a forum signature forever. - Neuro Fuzzy
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 9th May 2014 15:51
I would probably use "setCameraLookAt" and "setCameraPosition" and use the coordinates of the object you want in view.

To offset the camera from the object in any direction simply:



My hovercraft is full of eels

Login to post a reply

Server time is: 2024-04-27 23:03:45
Your offset time is: 2024-04-27 23:03:45