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 / something like third person camera

Author
Message
study
15
Years of Service
User Offline
Joined: 12th Dec 2008
Location:
Posted: 18th Dec 2008 22:41
As you see in this top-down style photo, I have an object in 3d space that rotates around its Y and point to mouse pointer. in this sample, camera angle is fix and if my object moves everywhere, camera follows it from this angle. but i want other thing.
i want follow the object with camera and when my object rotates with mouse camera rotates around object Y too, like third person camera but from top. i mean i need camera in back of my object and top.
Regard

Attachments

Login to view attachments
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 18th Dec 2008 23:30
Have you tried dbSetCameraToFollow().
Ive never used it, but it might do the trick.

Im having a bit of difficulty understanding the control system your trying to achieve. Is there any well known game that does this or are you tying something new?
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 18th Dec 2008 23:48
Here is what Im doing in .NET



Niels Henriksen
www.tales-of-the-realms.com
if Microsoft can sell software with bugs, so can I.
study
15
Years of Service
User Offline
Joined: 12th Dec 2008
Location:
Posted: 18th Dec 2008 23:50
I tried that function but i didn't get answer, maybe i use bad !
I don't know its new or not, let me explain it with GTA2:
in GTA2 camera moves with player but camera does not rotate with player and its pillar with ground too, i want to follow my object like GTA2 but my camera angle is not complete 90 degree with ground its about 75 degree ( look at picture ) and i want to rotate camera with my object. when i move mose to left up corner my object turns and looks left up corner but my camera is fixe there, i want to rotate camera with my object ( if i do this my camera always shows back of my object )
sorry my english is not good, I hope you understand what i mean.
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 19th Dec 2008 00:30 Edited at: 19th Dec 2008 00:31
I would look at Niels example above and try to get dbSetCameraToFollow() to work.

I'll show you what I use, but its probably not as easy as dbSetCameraToFollow().



itsX and itsZ = your new camera angles every loop.
distance = distance of camera from player(keep same for circular motion)
playerAngleY = current player angle
relativeCameraAngle = Where camera is relative to player(use 180 for camera behind)

Then I position camera at your playersX+itsX, anyYvalue, playersZ+itsZ.
Also Rotate Camera to match same angle as player.

dbSetCameraToFollow() is probably just doing something similar to what Im doing, the advantage of my way is that you can also use it to position objects around the player,
e.g a gun strapped to back etc..
I use it so when my player throws a grenade it always comes from the left hand side(throwing arm) of the player.

Going to bed now but will check in tommorrow, good luck.
study
15
Years of Service
User Offline
Joined: 12th Dec 2008
Location:
Posted: 19th Dec 2008 06:15
Thanks Friends
good sleeping matty, I hope good dream for you, something like you're making Fifa 2010 (-;
I think i understand how to do it with dbSetCameraToFollow() now.

Login to post a reply

Server time is: 2024-11-25 09:36:59
Your offset time is: 2024-11-25 09:36:59