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 / 3rd Person Chase cam, vehicle movement and rotation etc..

Author
Message
StOrM3
20
Years of Service
User Offline
Joined: 24th Sep 2003
Location: Cyberspace
Posted: 28th Oct 2004 07:16
Hello, I have been messing with trying to get a chase cam to work properly and have a vehicle that is centered in the screen, that you look down on kind of at an angle, and allows you to drive around a plane with buildings etc.. on it, and it keeps your vehicle centered and at a certain distance away from the camera, I am not having much luck, I went from it halfway working and the vehicle would rotate properly but when moving it looked like the vehicle was moving down into the terrain instead of forwards and backwards. Also, now on my second attempt I am unable to see a plain I created and textured at all, all I am getting is a black screen, what am I doing wrong ? Does anyone have a really simple example maybe using cubes for objects or something ?

PS. I think the reason I can't see anything, is it has something to do with the distance at which the plain is located from the camera, but not sure how to rotate it, or how to ensure the camera can see it correctly.


Thanks in advance.

Ken

[PKE] Pain Killa Entertainment(tm) [PKE]
Pain Brings Reality...
[PKE] Pain Killa Entertainment(tm) [PKE]
Mason
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: Arizona
Posted: 28th Oct 2004 08:18
Well, its quite hard to understand what you are saying. Post your code in here so people can take a look at it and try to help you. Once you throw in your code, I will be able to help you.

<-Mason->

-D-B-G- (Dark Basic Gamers)
StOrM3
20
Years of Service
User Offline
Joined: 24th Sep 2003
Location: Cyberspace
Posted: 28th Oct 2004 08:28
That is hard for me to do at this point, I am at work, but at lunch I will pull up my code, on my portable and retype it in here, to submit the code to this forum posting for you to look at.

[PKE] Pain Killa Entertainment(tm) [PKE]
Pain Brings Reality...
[PKE] Pain Killa Entertainment(tm) [PKE]
StOrM3
20
Years of Service
User Offline
Joined: 24th Sep 2003
Location: Cyberspace
Posted: 28th Oct 2004 10:03
type gozer
normal_model as integer
damaged_model as integer
dead_model as integer
health_left as integer
time_left as integer
lives_left as integer
current_level as integer
current_rage as integer
weapon1_radius as integer
weapon2_radius as integer
weapon1_ammo as integer
weapon2_ammo as integer
gozer_level as integer
gozer_front_blade as integer
gozer_back_blade as integer
gozer_engine as integer
gozer_tires as integer
gozer_weapon1 as integer
gozer_weapon2 as integer
gozer_special1 as integer
gozer_special2 as integer
gozer_armortype as integer
gozer_armorlevel as integer
gozer_locx as float
gozer_locy as float
gozer_locz as float
gozer_rotx as float
gozer_roty as float
gozer_rotz as float
gozer_cam_distance1 as float
gozer_cam_distance2 as float
gozer_cam_mode as integer
gozer_number_particles as integer
gozer_particle_model1 as integer
gozer_particle_model2 as integer
gozer_particle_model3 as integer
gozer_particle_life as integer
gozer_particle_randomness as integer
gozer_particle_status as integer
gozer_status as integer
gozer_controller as integer
gozer_path_1x as float
gozer_path_1z as float
gozer_path_2x as float
gozer_path_2z as float
gozer_path_3x as float
gozer_path_3z as float
gozer_path_4x as float
gozer_path_4z as float
gozer_ai_level as integer
gozer_ai_action as integer
gozer_ai_next as integer
gozer_ai_randomness as integer
gozer_speed_min as integer
gozer_speed_max as integer
gozer_speed_cur as integer
endtype

type LEVEL
model as integer
skybox as integer
texture as integer
sizex as integer
sizez as integer
number as integer
timelimit as integer
endtype

global Level1 as LEVEL
global Gozer1 as gozer

Game_Setup()
Setup_Level(1)
Paint_Terrain()
wait key

function Setup_Level(lvlnum)
Level1.model = 50 + lvlnum
Level1.skybox = 90 + lvlnum
Level1.texture = 70 + lvlnum
Level1.sizex = 5000
Level1.sizez = 5000
Level1.number = lvlnum
select lvlnum
case 1:Level1.timelimit = 1200000:endcase
case 2:Level1.timelimit = 18 * 60000 : endcase
case 3:Level1.timelimit = 17 * 60000 : endcase
case 4:Level1.timelimit = 16 * 60000 : endcase
case 5:Level1.timelimit = 15 * 60000 : endcase
case 6:Level1.timelimit = 14 * 60000 : endcase
case 7:Level1.timelimit = 13 * 60000 : endcase
case 8:Level1.timelimit = 12 * 60000 : endcase
case 9:Level1.timelimit = 11 * 60000 : endcase
case 10:Level1.timelimit = 10 * 60000 : endcase
endselect
make object plain Level1.model,Level1.sizex,Level1.sizez

position object Level1.model,0,0,15.0

select lvlnum
case 1: load image "grass_t.bmp",Level1.texture,0 : endcase
endselect

endfunction

function Game_Setup()
SYNC ON
SYNC RATE 60
Set display mode 1024,768,16
autocam off
make light 1
make camera 1
position camera 1,0,10.0,0
randomize timer()
endfunction

function Paint_Terrain()
texture object Level1.model, Level1.texture
endfunction

Phew.. There.. I had to retype all of that by hand.. whoa, hands are a little sore after that.

Hope this helps you figure out what I am doing wrong with the camera and why I can't see the plain or land object in the view.

Thanks

Ken

[PKE] Pain Killa Entertainment(tm) [PKE]
Pain Brings Reality...
[PKE] Pain Killa Entertainment(tm) [PKE]
StOrM3
20
Years of Service
User Offline
Joined: 24th Sep 2003
Location: Cyberspace
Posted: 28th Oct 2004 10:57
Okay I figured out what was wrong on my own, after looking at my code and looking at an example, I realized I was missing the very important sync statement.

Thanks for the help though, any other help on movement and physics etc.. would be greatly appreciated. I will also post the vehicle loading and what I have for movement so far tonight when I get home.

[PKE] Pain Killa Entertainment(tm) [PKE]
Pain Brings Reality...
[PKE] Pain Killa Entertainment(tm) [PKE]
The Wendigo
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: A hole near the base of a tree in the US
Posted: 28th Oct 2004 19:24
Just a note, I don't know for sure on this, but I think that Sync Rate 60 is not even being used. I think that command is only useful for when you have SYNC OFF. Again I don't know for sure on this, but it would make sense.


Home of DOOP, Strata Works, and Height
StOrM3
20
Years of Service
User Offline
Joined: 24th Sep 2003
Location: Cyberspace
Posted: 29th Oct 2004 11:09
Thanks for the info, I still need some more assistance, I now have the vehicle loaded, and the plain textured and lit correctly, and have the vehicle moving, but I need to attach the camera so that it moves with the vehicle at a steady rate, and rotates with the vehicle as well so the player can drive all over the terrain, anyone have any example code showing some fake physics even, or can someone explain better how to use the newton game dynamics library ? I looked at the examples but not sure how to use it to make my vehicle move, and make my buildings fall etc.. and animate exploding when they are hit at a certain speed by the vehicle.

Thanks,

Ken

[PKE] Pain Killa Entertainment(tm) [PKE]
Pain Brings Reality...
[PKE] Pain Killa Entertainment(tm) [PKE]

Login to post a reply

Server time is: 2024-09-23 04:19:21
Your offset time is: 2024-09-23 04:19:21