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.

Dark GDK / Camera Orbit

Author
Message
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 3rd Jun 2008 06:59
I noticed there haven't been any threads about a camera orbit thing in DGDK...

I decided to help the community... enjoy!



If you call "cameraControl()" in your main loop, you can use the middle mouse button to orbit, and mouse wheel to zoom in and out.

It's still preliminal... I'll edit this post once I have a fix.

I AM THE ALL MIGHTY CORNHOLIO! Do you have TP for my bunghole?
Timmox
16
Years of Service
User Offline
Joined: 2nd Jun 2008
Location:
Posted: 4th Jun 2008 14:15
Hi.. thanks for code snippet I like this routine as I am absolute crap at (trig)... it works well but there is a problem with 360 degree rotation as the image flips 180 when the X or Y angles appoach 270. Can this be compensated for and what is the trig to do this!!!. Can you help modify this or shall we ask the forum members, I will try also but don't hold ur breath?
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 6th Jun 2008 10:56 Edited at: 6th Jun 2008 10:58
Not to crap on your code, but there is a function that already does this =P Here is a much simplified version;

Replace


With


This will follow, and orbit around if the object is spinning, the objects coordinates at a height of 5. It also has a smooth command which will make the movement less jerky.

Cheers!


Tux is my guildmaster.

Login to post a reply

Server time is: 2024-11-17 17:26:36
Your offset time is: 2024-11-17 17:26:36