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 Problems

Author
Message
Digital Dragon
19
Years of Service
User Offline
Joined: 17th Dec 2004
Location: ...
Posted: 7th Apr 2006 20:45
Hey,
In my game that i am making this is the code that i am using for my camera, it is simple but unfortunatly it doesn't work properly, it will follow the character but it won't turn as the character does which makes it hard to see where i am going.
Here it is:


If anyone could post a code on how i could improve this then please do.

Thanks

Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 7th Apr 2006 22:51
There is a command made to make a camera follow an object.



Insanity is just a state of mind
Digital Dragon
19
Years of Service
User Offline
Joined: 17th Dec 2004
Location: ...
Posted: 9th Apr 2006 21:49
Yeah that works but i need to to roatate as the player does if you could.

Thanks

Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 10th Apr 2006 00:01
After that piece of code I posted before try putting



Insanity is just a state of mind
Digital Dragon
19
Years of Service
User Offline
Joined: 17th Dec 2004
Location: ...
Posted: 11th Apr 2006 21:29
Thanks but this is like the code I started with, it will be fine until i move about 180 degrees round then it will fix and won't move with the player anymore, any help would be apprechiated.

Thanks

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 12th Apr 2006 06:33 Edited at: 12th Apr 2006 06:35
There are a few camera controlling routines on my web site if you want to check them out. (Link in sig at bottom of post).

You should find what you are after in the 'Code Hints' section.

TDK_Man

david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 13th Apr 2006 08:08
you can use your original code, all you have to do is set the camera rotation to the players rotation. easy fix.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 13th Apr 2006 13:31
Your code modified so it works;



Boo!
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 13th Apr 2006 13:35 Edited at: 13th Apr 2006 13:35
Daemon's suggestion is also a useful one as it gives much smoother movement;



Boo!
Digital Dragon
19
Years of Service
User Offline
Joined: 17th Dec 2004
Location: ...
Posted: 14th Apr 2006 19:11
Thanks a lot, i have now got it working properly

Login to post a reply

Server time is: 2024-09-24 21:39:24
Your offset time is: 2024-09-24 21:39:24