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 Question

Author
Message
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 21st May 2007 02:10 Edited at: 21st May 2007 02:11
Hi I'm trying to make a camera to point to an object and then move toward him...problem is pointCamera points imediatly to the object so I created a little function that gets the lowest turn angle and then turns the camera to the object, I also created a function that after turning the camera moves the camera toward the object! Now I'm looking for a way of combining the two functions so that the camera moves while it turns...For that I'm calculating the angle between the camera and the object and then move foward, but my results are a bit bad I'm sending the code I've made so far:
James Bondo
17
Years of Service
User Offline
Joined: 12th Nov 2006
Location: Denmark
Posted: 21st May 2007 15:40
You should try the
Set Camera To Follow command

Using Dark GDK.NET
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 21st May 2007 19:30
James Bondo the set camera to follow doesn't do what I'm looking, because my camera is on a top view so when I click on an object the camera should follow toward the object and rotate so that the object is facing on top of the screen!

Today I had this idea
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 22nd May 2007 14:12
Hi just to say that I've resolved my problem I've based on the idea I had before but change a few things related to the angles ex

Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 23rd May 2007 23:35
Hi everybody I need help with a new camera problem.. I need to find a way to make the camera point to an object...yes there's the PointCamera command, but I need to make it transitional, meaning that the camera will ajust it's angle till is pointing to an object! Making it more difficult I need given a distance to that object, make the camera rotate while moving (the movement part is done probl is only the angle) to the object so that when the camera reaches the object has already rotated!

I have a function that gives me the lesser angle between the object and the camera, but I need to make the camera rotate in the opposite way, in a proportional way to the distance left
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 24th May 2007 01:01
If you use the dbSetCameraToFollow function, this actually allows the camera movement to interpolate across to a given point and angle using a smooth spline. It works similiar to the CurveValue functions where the camera moves over a time period. You might want to experiment with this function to achieve the desired effect.

Paul.


Abundance = Choice = Freedom - Scarcity = Dependancy = Control, Truth!
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 24th May 2007 02:25
OK thanks Apex I'll take a look
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 25th May 2007 20:46
Hi I came across a new problem, I'm using the mouse to rotate the camera around an object, probl is, since I'm using mousemovex + the current camera angle Y, to give a complete turn around the object the mouse needs to be positioned on the left or right edges of the screen...

Login to post a reply

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