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.

Newcomers DBPro Corner / Camera Following

Author
Message
Black Hydra
20
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 8th Oct 2003 22:14
I have recently downloaded the DBPro trial version. I have been trying to teach myself but I am stuck at this one point.

I want to have it so that when I rotate my object (sphere primitive) the camera is always directly behind it. I am using some cubes as reference points (so I will know whether or not it is working). I am only having it move on the z and x planes (i.e. not up and down). I have been trying to see if there is a built in function that would do this but I cannot see one that looks like it would work. I have also tried using my knowlage of geometry(spelling?) to find the formula I could use (I would use sine or cosine but then that would make the camera further away as the hypotenuse is longer than the other sides.)

Please could someone tell me a function that could work or a mathematical formula that would allow me just to change the angle variable for the rotation speed to manipulate how the camera moves.
My mind is shot and as I am only taking Grade 10 pre-calculus I haven't learned how to use a formula that would utilize this. Please could someone guide me I am lost...
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 8th Oct 2003 23:18
SET CAMERA TO FOLLOW

and

POINT CAMERA

will do the trick. The first command will also allow you to do some neat time-delay type following.

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php
Black Hydra
20
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 9th Oct 2003 01:03
Thanks BatVink! I will try that one out. I was trying to see if by using
xsquared zsquared = rsquared and angles would solve my problem but yours will probably be alot easier. thanks.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 9th Oct 2003 02:45
I have just posted a snippet in general talk area to a post about moving a sphere around a matrix. I have used the camera following code in there if you are interested.

If your mansion house needs haunting, just call Rentaghost!
Black Hydra
20
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 9th Oct 2003 03:54
Where is it spooky? General talk? Is that the DBPro or DB forum or code base? Maybe a link?

And as for BatVink I tried but I really don't see how I am supposed to use those two functions to make the camera follow the object directly behind it. I am not questioning that you can I just don't see how you used them to do what I needed.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 9th Oct 2003 04:38
maybe i can help out here.


Blivvy a master maths guru from the 7th dimension showed me this technique.

Pull it apart to your hearts content.



spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 9th Oct 2003 12:11
Ehh, it's in the bottom topic on main forum page called 'general talk' in 'off-topic' section. Someone asked a question there for some stupid reason!

Here is code again:



If your mansion house needs haunting, just call Rentaghost!
Black Hydra
20
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 9th Oct 2003 22:36
Thanks guys. I tried the two out.

I think I am going to use Spooky's method because it already uses the arrow keys and I only needed the rotation with the view on the x/z plane so there wasn't as much use for the y value though.

But I am definetly saving that code snippet from Indi.

Login to post a reply

Server time is: 2024-09-21 04:05:29
Your offset time is: 2024-09-21 04:05:29