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 from bottum of object?

Author
Message
Acolyte Entertainment
19
Years of Service
User Offline
Joined: 28th Dec 2004
Location: Oregon, US
Posted: 3rd Jan 2005 13:53
For some reason what ever i do the camera ends up under my "Knight.x" object and i cant change it this is my code:


rem make character
load object "knight.X", 1
sync on : sync rate 0

`make it easy to see the player turning and moving
make matrix 1, 1000, 1000, 50, 50

`place player near the center of the matrix
position object 1, 500, 5, 500

do

`player movement and turning
if upkey() = 1 then move object 1, 1
if downkey() = 1 then move object 1, -1
if leftkey() = 1 then yrotate object 1, object angle y(1) - 1
if rightkey() = 1 then yrotate object 1, object angle y(1) + 1
`store player posuition
objx# = object position x(1)
objy# = object position y(1)
objz# = object position z(1)
`place the camera at the players position and face it the same angles it faces
position camera objx#, objy#, objz#
set camera to object orientation 1

`move camera straight up
xrotate camera 90
move camera -7
`set camera back to players angles and move it behind him
set camera to object orientation 1
move camera -30
`draw changes
sync
loop
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 3rd Jan 2005 19:13
what are you trying to do?

do you want third person view or something?

Am I the only one here who's really confused?
http://db1games.topcities.com
(used to be demonsbreath)
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 3rd Jan 2005 19:20 Edited at: 3rd Jan 2005 19:20
DM2 objects are created laying down and (I know this is going to shock you) set camera to object orientation is bugged Try this code instead.



Acolyte Entertainment
19
Years of Service
User Offline
Joined: 28th Dec 2004
Location: Oregon, US
Posted: 3rd Jan 2005 23:40
yes im trying to created 3drd person thanks ill try them
bibz1st
21
Years of Service
User Offline
Joined: 2nd Jan 2003
Location:
Posted: 4th Jan 2005 00:10
use SET CAMERA TO FOLLOW command
Acolyte Entertainment
19
Years of Service
User Offline
Joined: 28th Dec 2004
Location: Oregon, US
Posted: 4th Jan 2005 08:41
like what do you type after SET CAMERA TO FOLLOW command?

Login to post a reply

Server time is: 2024-11-11 22:48:42
Your offset time is: 2024-11-11 22:48:42