Gamestudio Links
Zorro Links
Newest Posts
zorro with ccxt?
by opm. 03/03/26 03:17
ZorroGPT
by TipmyPip. 03/02/26 18:13
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (AndrewAMD, TipmyPip, USER0328, Quad), 4,912 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 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 Online
Senior Expert
Quad  Online
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