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 / Mouse Camera Movement II

Author
Message
Siolis
18
Years of Service
User Offline
Joined: 19th May 2006
Location:
Posted: 11th Feb 2007 23:24 Edited at: 11th Feb 2007 23:25
Ok, I’ve used the code from my last thread of this name to get a camera adjustment on my third person prospective camera.

However I want the camera to move around the character object in an orbit so you click the left mouse button and then move the mouse up, down, left and right to move the camera around while keeping the camera behind the character object. That way when i press up or down I can move the character forward and backward while controlling the characters direction movement via the mouse.

To do this I have gotten this code to control the camera but thus far can’t work out how to orbit the character, instead it turns on the spot in a 360 degree fashion whereas I want it the camera to move while it points at the object:



A Dragons Legacy...a blog by S.R.Deoden
"Look you son of a suitcase..." - Rinsewind yelling at the Luggage in The Light Fantastic
James Bondo
17
Years of Service
User Offline
Joined: 12th Nov 2006
Location: Denmark
Posted: 12th Feb 2007 01:02
Im not much of a math expert and im pretty sure theres some fancy math that can do it.

However, i did something similar with an object (orbit it a bit away but always facing the center).
I did it by, every loop, position the camera at the player, rotate the camera, then move it backwards.

Using Dark GDK.NET
Siolis
18
Years of Service
User Offline
Joined: 19th May 2006
Location:
Posted: 12th Feb 2007 01:07
That’s what I just did actually and then set the character controls on the character object. I’m now working on correcting a jerk movement which occurs when I left click for the perspective adjustment.

I should really spend a night working on a problem before i post cus I’ve basically solved this issue.

A Dragons Legacy...a blog by S.R.Deoden
"Look you son of a suitcase..." - Rinsewind yelling at the Luggage in The Light Fantastic
Zumwalt
17
Years of Service
User Offline
Joined: 1st Feb 2007
Location: Tampa, FL
Posted: 16th Feb 2007 04:34
I would love to see your final solution for this.
Siolis
18
Years of Service
User Offline
Joined: 19th May 2006
Location:
Posted: 17th Feb 2007 15:10
Of course you would. The camera from World of Warcraft is not nearly as easy to make as one would think but its a fantastic way of having a third person camera.

I have nearly completed its construction now, just one issue with the left and right, non-left click movement camera to sort out now and as I worked it out I cant post it as its part of my finished game code which is copyrighted to me so what I’m trying to say is "No, sorry".

If I post an issue and someone else comes up with some solution (or partial solution) then I will post that piece of code with anything I add to make it work but as I say, I wrote the working code.

A Dragons Legacy...a blog by S.R.Deoden
"Look you son of a suitcase..." - Rinsewind yelling at the Luggage in The Light Fantastic
Zumwalt
17
Years of Service
User Offline
Joined: 1st Feb 2007
Location: Tampa, FL
Posted: 17th Feb 2007 18:56
er ok.. well then.. i'll just thank you for letting us know that it is possible and leave it at that

Login to post a reply

Server time is: 2024-09-28 23:17:07
Your offset time is: 2024-09-28 23:17:07