2 registered members (TipmyPip, 1 invisible),
18,789
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
3rd person camera with tilt
#377381
07/12/11 16:38
07/12/11 16:38
|
Joined: Apr 2011
Posts: 40 germany
Wollez
OP
Newbie
|
OP
Newbie
Joined: Apr 2011
Posts: 40
germany
|
hi, my 3rd person camera script looks like so:
function camera_follow(ENTITY* ent_for_camera)
{
vec_set(camera.pan,vector(ent_for_camera.pan,-30,0)); // look in player direction, slighty down
while(1)
{
vec_set(camera.x,vector(-275,0,200)); // camera position relative to the player
vec_rotate(camera.x,ent_for_camera.pan); // rotate the camera position with the player
vec_add(camera.x,ent_for_camera.x); // add player position
wait(1);
}
}
but like that I can only look left and right, but not up and down. How do I do that?
|
|
|
Re: 3rd person camera with tilt
[Re: Wollez]
#377391
07/12/11 17:39
07/12/11 17:39
|
Malice
Unregistered
|
Malice
Unregistered
|
Wouldn't it work fin if you removed the whole line?
function camera_follow(ENTITY* ent_for_camera)
{
while(1)
{
vec_set(camera.x,vector(-275,0,200)); // camera position relative to the player
vec_rotate(camera.x,ent_for_camera.pan); // rotate the camera position with the player
vec_add(camera.x,ent_for_camera.x); // add player position
camera.tile -= 0.5*mickey.y* time_Step;
wait(1);
}
}
Last edited by Malice; 07/12/11 17:43.
|
|
|
Re: 3rd person camera with tilt
[Re: Wollez]
#377686
07/15/11 15:30
07/15/11 15:30
|
Malice
Unregistered
|
Malice
Unregistered
|
Why don't you take a look inside the improved 3rd person camera code.. HERE> I used Google translate to change the comment tags and better understand whats going on.
|
|
|
Re: 3rd person camera with tilt
[Re: MasterQ32]
#377688
07/15/11 16:10
07/15/11 16:10
|
Malice
Unregistered
|
Malice
Unregistered
|
Richi007 > That would tilt the player model. If I remember his code right.
He needs to set up some temp vectors to hold operations.
Last edited by Malice; 07/15/11 16:11.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|