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
1 registered members (TipmyPip), 18,484 guests, and 6 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
camera follows target without moving? #309061
02/06/10 22:19
02/06/10 22:19
Joined: Dec 2009
Posts: 71
N
ncc1701d Offline OP
Junior Member
ncc1701d  Offline OP
Junior Member
N

Joined: Dec 2009
Posts: 71
The tutorial shows a ball game where a camera follows the ball always at a certain distance from the target ball. I get that.
How might I go about following the target ball from a fixed location? Like camera is locked down and target follows the ball?
Looking for hints.
thank you.

Re: camera follows target without moving? [Re: ncc1701d] #309065
02/06/10 22:36
02/06/10 22:36
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
VECTOR temp;
vec_set(temp,ball.x);
vec_sub(temp,camera.x);
vec_to_angle(camera.pan,temp);

if camera looks backwards try this one:

VECTOR temp;
vec_set(temp,camera.x);
vec_sub(temp,ball.x);
vec_to_angle(camera.pan,temp);


3333333333

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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