|
Re: change my tilt
[Re: tek]
#81993
07/18/06 19:04
07/18/06 19:04
|
Joined: Apr 2005
Posts: 2,332 Germany, BaWü
aztec
![](/ubb7/images/groups/mod.gif)
Expert
|
![](/ubb7/images/groups/mod.gif)
Expert
Joined: Apr 2005
Posts: 2,332
Germany, BaWü
|
is there a var that is called tilt_3rd at the beginning? if so you could replace it with another number so maybe the var is 5 so replace it with 12 or whatever ![](/ubbthreads/images/graemlins/smirk.gif)
Visit: schwenkschuster-design.de
|
|
|
Re: change my tilt
[Re: aztec]
#81994
07/18/06 19:23
07/18/06 19:23
|
Joined: Jul 2002
Posts: 4,436 Germany, Luebeck
Xarthor
Expert
|
Expert
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
|
Code:
function update_views() { dist_planar = cos (-camera.tilt) * dist_total; camera.pan = player.pan; camera.tilt = -70; //play with this value camera.x = player.x - cos(player.pan)*cos(-player.tilt)*zoom; camera.y = player.y - sin(player.pan)*cos(-player.tilt)*zoom; camera.z = player.z + sin(-camera.tilt)*zoom; camera.pan = cam_angle; camera.roll = 0; validate_view(); }
This _should_ work but I've not tested it ![](/ubbthreads/images/graemlins/wink.gif) EDIT: which tutorial did you follow? could you please post a link and I'll might take a look at it to see what the author did intend to do, and how I can help you out.
Last edited by Thunder; 07/18/06 19:25.
|
|
|
Re: change my tilt
[Re: aztec]
#81995
07/19/06 00:39
07/19/06 00:39
|
Joined: May 2005
Posts: 222
tek
OP
Member
|
OP
Member
Joined: May 2005
Posts: 222
|
Quote:
is there a var that is called tilt_3rd at the beginning? if so you could replace it with another number so maybe the var is 5 so replace it with 12 or whatever
I wish it was that easy, I tried changing the variable so many times but nothing happened.
Quote:
Code: --------------------------------------------------------------------------------
function update_views(){ dist_planar = cos (-camera.tilt) * dist_total; camera.pan = player.pan; camera.tilt = -70; //play with this value camera.x = player.x - cos(player.pan)*cos(-player.tilt)*zoom; camera.y = player.y - sin(player.pan)*cos(-player.tilt)*zoom; camera.z = player.z + sin(-camera.tilt)*zoom; camera.pan = cam_angle; camera.roll = 0; validate_view();}
--------------------------------------------------------------------------------
This _should_ work but I've not tested it
You don't need to test it it works, yet it gave me another problem with my bullet, before my bullet would touch the ground and move forward. now when i shoot it doesnt move forward. I believe this is because it's to close to the ground, I tried moving it up but nothing I did seemed to work.
I know this is asking too much but I tried myself for almost two hours and coulnt change the bullet direction. Do you happen to know how to make my bullet z direction go up ?
This is the code for my bullet.
Quote:
function player_bullet_event() { my.event = 0; my.invisible = on; if(you != 0){if(you.gegner== on){you.health -= 10;}} waitt(5); ent_remove(my); }
function player_bullet() { my.passable = on; my.scale_x = 1.9; my.scale_y = 1.9; my.scale_z = 17.9; my.narrow = on; wait(1); my.min_x = -1; my.min_y = -1; my.max_x = 1; my.max_y = 1; my.pan = camera.pan; my.tilt = camera.tilt; my.skin = 2; my.flare = on; my.bright = on; my.ambient = 100; my.unlit = on; my.enable_entity = on; my.enable_impact = on; my.enable_block = on; my.event = player_bullet_event; while (1) { if(vec_dist(my.x,player.x)>40){my.passable = off;} move_mode = ignore_you+ignore_passable+glide; ent_move(vector(100*time,0,0),nullvector); wait(1); } }
function player_shoot() { if(player.health < 1){return;} ent_create("bullet.mdl",player.x,player_bullet); } on_mouse_left = player_shoot; on_ctrl=player_shoot;
I tried changing the "my.scale_z = 17.9;" but it would not make the bullet go the z direction up. I am lost. I tried changing every number.
Quote:
which tutorial did you follow? could you please post a link and I'll might take a look at it to see what the author did intend to do, and how I can help you out.
I followed the AI_Tutor by tuschcarsten the code works well, it's meant for 1st person shooter but somehow I transferred it to third. If I am bugging you guys with too much questions I am sorry, i just want my game to have everything I need it to have. You don't have to answer if you dont want.
Last edited by tek; 07/19/06 00:43.
|
|
|
Re: change my tilt
[Re: tek]
#81996
07/19/06 06:07
07/19/06 06:07
|
Joined: Jul 2002
Posts: 4,436 Germany, Luebeck
Xarthor
Expert
|
Expert
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
|
lol, if noone wants to answer noone would I guess ![](/ubbthreads/images/graemlins/wink.gif) simple as that. Alright about your bullet problem: scale_z has nothing to do with the bullets angle nor direction. its just a skill to scale the bullet (make it bigger for example). You just need to change 1 line in your player_bullet function, here it is: (updated) Code:
function player_bullet() { my.passable = on; my.scale_x = 1.9; my.scale_y = 1.9; my.scale_z = 1.9; my.narrow = on; wait(1); my.min_x = -1; my.min_y = -1; my.max_x = 1; my.max_y = 1; my.pan = camera.pan; my.tilt = player.tilt; //CHANGED my.skin = 2; my.flare = on; my.bright = on; my.ambient = 100; my.unlit = on; my.enable_entity = on; my.enable_impact = on; my.enable_block = on; my.event = player_bullet_event; while (1) { if(vec_dist(my.x,player.x)>40){my.passable = off;} move_mode = ignore_you+ignore_passable+glide; ent_move(vector(100*time,0,0),nullvector); wait(1); } }
|
|
|
Re: change my tilt
[Re: Xarthor]
#81997
07/19/06 13:29
07/19/06 13:29
|
Joined: May 2005
Posts: 222
tek
OP
Member
|
OP
Member
Joined: May 2005
Posts: 222
|
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|