Modifying the third person camera
by Joshua Ayers · in Torque Game Engine · 09/15/2005 (7:19 am) · 7 replies
Is there an easy way to make the third person camera the default, and to change its position? i've found i can use server\scripts\player.cs to modify the camera distance, but i'm unsure about moving the camera up vertically and kind of pointing it down towards the player (sort of like the old final fantasy / zelda camera angle). might be nice to have the option of locking the camera also...
i looked through a couple of the files in the source code that i thought may be related (think they were camera.h, camera.cc), but i have to admit i really had no idea what needed to be changed. is there an easy way to do this with scripts instead of the source?
i looked through a couple of the files in the source code that i thought may be related (think they were camera.h, camera.cc), but i have to admit i really had no idea what needed to be changed. is there an easy way to do this with scripts instead of the source?
#2
09/15/2005 (7:28 am)
Yeah i saw that, was just hoping it would be a little easier than having to add stuff into the source. thanks though, i'll try it out.
#3
starter.fps/server/scripts/game.cs (208): Unable to instantiate non-conobject class AdvancedCamera.
Set::add: Object "0" doesn't exist
starter.fps/server/scripts/game.cs (210): Unable to find object: '0' attempting to call function 'scopeToClient'
starter.fps/server/scripts/game.cs (319): Unable to find object: '' attempting to call function 'setTransform'
starter.fps/server/scripts/game.cs (326): Unable to find function setCamView
starter.fps/server/scripts/game.cs (331): Unable to find object: '0' attempting to call function 'setPlayerObject'
starter.fps/server/scripts/game.cs (332): Unable to find object: '0' attempting to call function 'setThirdPersonMode'
starter.fps/server/scripts/game.cs (333): Unable to find object: '0' attempting to call function 'setFollowTerrainMode'
starter.fps/server/scripts/game.cs (334): Unable to find object: '0' attempting to call function 'setVerticalFreedomMode'
Mapping string: MissionStart to index: 11
Mapping string: SyncClock to index: 12
Could not locate texture: starter.fps/data/shapes/player/crossbow
Could not locate texture: starter.fps/data/shapes/player/clip
*** Initial Control Object
Activating DirectInput...
keyboard0 input device acquired.
Could not locate texture: starter.fps/data/shapes/player/crossbow
Could not locate texture: starter.fps/data/shapes/player/clip
Mapping string: Kork to index: 13
starter.fps/client/scripts/default.bind.cs (109): Unable to find function AvatarCamRotateCounterClockwise
starter.fps/client/scripts/default.bind.cs (119): Unable to find function AvatarCamPitchUp
starter.fps/client/scripts/default.bind.cs (109): Unable to find function AvatarCamRotateCounterClockwise
starter.fps/client/scripts/default.bind.cs (119): Unable to find function AvatarCamPitchUp
starter.fps/client/scripts/default.bind.cs (109): Unable to find function AvatarCamRotateCounterClockwise
starter.fps/client/scripts/default.bind.cs (119): Unable to find function AvatarCamPitchUp
starter.fps/client/scripts/default.bind.cs (109): Unable to find function AvatarCamRotateCounterClockwise
starter.fps/client/scripts/default.bind.cs (119): Unable to find function AvatarCamPitchUp
starter.fps/client/scripts/default.bind.cs (108): Unable to find function AvatarCamRotateClockwise
starter.fps/client/scripts/default.bind.cs (120): Unable to find function AvatarCamPitchDown
starter.fps/client/scripts/default.bind.cs (108): Unable to find function AvatarCamRotateClockwise
starter.fps/client/scripts/default.bind.cs (120): Unable to find function AvatarCamPitchDown
i'm guessing those functions don't exist..don't remember seeing them anywhere, though. any ideas? noticed in the second link someone else had the same problem.
09/15/2005 (10:11 am)
Compiled fine, but in the console i've got some errors:starter.fps/server/scripts/game.cs (208): Unable to instantiate non-conobject class AdvancedCamera.
Set::add: Object "0" doesn't exist
starter.fps/server/scripts/game.cs (210): Unable to find object: '0' attempting to call function 'scopeToClient'
starter.fps/server/scripts/game.cs (319): Unable to find object: '' attempting to call function 'setTransform'
starter.fps/server/scripts/game.cs (326): Unable to find function setCamView
starter.fps/server/scripts/game.cs (331): Unable to find object: '0' attempting to call function 'setPlayerObject'
starter.fps/server/scripts/game.cs (332): Unable to find object: '0' attempting to call function 'setThirdPersonMode'
starter.fps/server/scripts/game.cs (333): Unable to find object: '0' attempting to call function 'setFollowTerrainMode'
starter.fps/server/scripts/game.cs (334): Unable to find object: '0' attempting to call function 'setVerticalFreedomMode'
Mapping string: MissionStart to index: 11
Mapping string: SyncClock to index: 12
Could not locate texture: starter.fps/data/shapes/player/crossbow
Could not locate texture: starter.fps/data/shapes/player/clip
*** Initial Control Object
Activating DirectInput...
keyboard0 input device acquired.
Could not locate texture: starter.fps/data/shapes/player/crossbow
Could not locate texture: starter.fps/data/shapes/player/clip
Mapping string: Kork to index: 13
starter.fps/client/scripts/default.bind.cs (109): Unable to find function AvatarCamRotateCounterClockwise
starter.fps/client/scripts/default.bind.cs (119): Unable to find function AvatarCamPitchUp
starter.fps/client/scripts/default.bind.cs (109): Unable to find function AvatarCamRotateCounterClockwise
starter.fps/client/scripts/default.bind.cs (119): Unable to find function AvatarCamPitchUp
starter.fps/client/scripts/default.bind.cs (109): Unable to find function AvatarCamRotateCounterClockwise
starter.fps/client/scripts/default.bind.cs (119): Unable to find function AvatarCamPitchUp
starter.fps/client/scripts/default.bind.cs (109): Unable to find function AvatarCamRotateCounterClockwise
starter.fps/client/scripts/default.bind.cs (119): Unable to find function AvatarCamPitchUp
starter.fps/client/scripts/default.bind.cs (108): Unable to find function AvatarCamRotateClockwise
starter.fps/client/scripts/default.bind.cs (120): Unable to find function AvatarCamPitchDown
starter.fps/client/scripts/default.bind.cs (108): Unable to find function AvatarCamRotateClockwise
starter.fps/client/scripts/default.bind.cs (120): Unable to find function AvatarCamPitchDown
i'm guessing those functions don't exist..don't remember seeing them anywhere, though. any ideas? noticed in the second link someone else had the same problem.
#4
09/15/2005 (10:36 am)
Make sure ayou add Advcamera.cc to you project and re build
#5
09/15/2005 (2:46 pm)
Yeah, i did that. also added it to the make file. didn't seem to make any difference. wonder if it's because i'm using tbe. sure doesn't seem like the file is getting included.
#6
I think you can do that in your modeling program by moveing your eye node up and rotateing it.
Makeing 3rd person view default can be done in scripts.
09/16/2005 (7:39 pm)
If your "unsure about moving the camera up vertically and kind of pointing it down towards the player"I think you can do that in your modeling program by moveing your eye node up and rotateing it.
Makeing 3rd person view default can be done in scripts.
#7
09/18/2005 (6:39 am)
Ah. didn't even think about the eye node. have to admit all of my experience has just been with quakec, so it's taking me awhile to get used to how things work in torque between the source code, scripts, and models. thanks for the info though. i'll do some more research into it.
Torque Owner Kevin Johnson
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5471
Orbit Mode
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5934