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 is messed up help!!!!!!!!!

Author
Message
Major Payn
20
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 25th Dec 2003 23:16
Ok I am still making my tank game and have this code


set camera to follow x#,y#,z#,oby#,20,y#+10,3,1
point camera x#,y#,z#


the camera follows the tank but when I turn left of right the camera does not stay behind the tank, it keeps pointing forward.
What should I use to keep the camera behind the tank and not to the side of it?

Guns dont kill people, death kills people.
Philip 1337
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 26th Dec 2003 00:58


This code positions the camera inside the tank, makes it look in the same direction and then moves it away from the tank.

Hope this helps you.

Major Payn
20
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 26th Dec 2003 03:21
I need a third person view that stays behind the tank at all times. right now when I move the camera keeps pointing strait and doesnt move with the tank.

Guns dont kill people, death kills people.
BearCDPOLD
20
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 26th Dec 2003 08:20
You can probably just add that bit from G Bros about
Set Camera to Object Orientation. If that doesn't work then.....I'll figure it out later, it's getting late.

Juvenile Industries
Current Project: The First Room (FPS)
Soon to come:An rts, and a snowball fight game
Major Payn
20
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 26th Dec 2003 20:44
the code still doesnt work, the camera does not point left or right just forward. The camera follows the tank but when you turn it does not point in the direction the tank is moving. Also the object number for the tank is 1.

Guns dont kill people, death kills people.
Emperor Baal
20
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 26th Dec 2003 20:55 Edited at: 26th Dec 2003 21:02
This is a piece of code from my MVS Matrix file demonstration

You might want to play with the CameraZ and CameraX formulas (change "- sin" into "+ sin") this will rotate the camera around the object

If the camera is in the front of the vehicle change the "-" into "+" of both formulas. Just keep playing with those two and eventually you will find the right ones




Quote: "
Amd 2500+ | 1024mb pc2700 | A7N8X-X | Geforce4 ti 4200 128mb
"
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 26th Dec 2003 21:00
this assumes the player is object 1:


hope that helps


GO TO THE ETERNAL DESTINY FORUMS!!! http://forums.eternaldestinyonline.com
Do it now!!!
Emperor Baal
20
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 26th Dec 2003 21:03
Long Live MATH, why do you guys always use new x/y value? Long Live MATH!


Quote: "
Amd 2500+ | 1024mb pc2700 | A7N8X-X | Geforce4 ti 4200 128mb
"
Major Payn
20
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 26th Dec 2003 21:51
I tried both code snippets but it hasnt fixed my problem. when I turn my tank it keeps looking forward in the last direction it was facing. The camera only looks in front of the tank when it is moving in a north direction.when Even when I turn my tank around it keeps looking nort so you see the front of the tank I want a 3rd person perspective slightly obove the tank that will give me a good view of the battlefield.

Guns dont kill people, death kills people.
BearCDPOLD
20
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 26th Dec 2003 23:07
Every time you rotate the tank, store its current x, y, and z rotation values, subtract them from the newly rotated x, y, and z values and calculate that all in wrapvalue(oldx-newx), wrapvalues(oldy-newy), etc.
Wrapvalue keeps it all in a 360 degree range, so you can use
rotate camera x,y,z
It is much more accurate and responsive.

Juvenile Industries
Current Project: The First Room (FPS)
Soon to come:An rts, and a snowball fight game
Major Payn
20
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 26th Dec 2003 23:22
How do I do that? I am a newbie.

Guns dont kill people, death kills people.

Login to post a reply

Server time is: 2024-09-21 15:07:57
Your offset time is: 2024-09-21 15:07:57