Gamestudio Links
Zorro Links
Newest Posts
freewhyblogelsewhere
by 9489cpjf. 06/03/24 06:06
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,321 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19056 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,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İ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 | chip programmers | 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