Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (TipmyPip, AndrewAMD, dBc, clonman), 18,643 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How can I get my 3rd person camera to follow my plane? #345305
10/25/10 01:37
10/25/10 01:37
Joined: Oct 2010
Posts: 7
USA
R
RocketMan Offline OP
Newbie
RocketMan  Offline OP
Newbie
R

Joined: Oct 2010
Posts: 7
USA
vec_set(camera.x, player.x);
vec_set(camera.y, player.y);
vec_set(camera.z, player.z+125);
vec_set(camera.pan,player.pan);
Thats my code for now but I need the camera to follow -700 behind the plane (y)and when I add that, everytime my plane turns the camera turns away. Its really annoying pls help.

Re: How can I get my 3rd person camera to follow my plane? [Re: RocketMan] #345307
10/25/10 05:09
10/25/10 05:09
Joined: Feb 2010
Posts: 320
TANA/Madagascar
3dgs_snake Offline
Senior Member
3dgs_snake  Offline
Senior Member

Joined: Feb 2010
Posts: 320
TANA/Madagascar
For what you want, you can do:
Code:
var cam_height = 125;
var cam_dist = 700;
VECTOR temp;

vec_set(&temp, me.x);
temp.z += cam_height; 
temp.x -= cam_dist * cos(me.pan);
temp.y -= cam_dist * sin(me.pan);

vec_set(camera.x, &temp);
camera.pan = me.pan ;



But it is very basic for a third person camera, you can smooth the camera movement.

PS : You can replace me by player or whatever entity you want to follow.

Last edited by 3dgs_snake; 10/25/10 05:13.
Re: How can I get my 3rd person camera to follow my plane? [Re: 3dgs_snake] #345413
10/25/10 23:40
10/25/10 23:40
Joined: Oct 2010
Posts: 7
USA
R
RocketMan Offline OP
Newbie
RocketMan  Offline OP
Newbie
R

Joined: Oct 2010
Posts: 7
USA
Man you are the best!
Thank you so much, worked like a charm.


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1