Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,251 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
camera rotation #265344
05/12/09 07:31
05/12/09 07:31
Joined: Mar 2009
Posts: 276
Cebu City, Philippines
boyax Offline OP
Member
boyax  Offline OP
Member

Joined: Mar 2009
Posts: 276
Cebu City, Philippines
Hi guys,

How to make the camera rotate around the player? The player is just in stand position.

i'm playing with this code:
Code:
vec_set(temp, player.x); 
vec_sub(temp, camera.x);    	    	
vec_to_angle(camera.pan, temp);


I think that would be the idea... but seems not working for me...

Any idea? Thanks

Re: camera rotation [Re: boyax] #265346
05/12/09 08:01
05/12/09 08:01
Joined: Oct 2007
Posts: 116
S
sydan Offline
Member
sydan  Offline
Member
S

Joined: Oct 2007
Posts: 116
If the camera is looking away from the player swap player.x and camera.x. This wont get it to rotate though only look at the player.

You could attach the camera to a vertex of an object that is the right distance away from the player. The object is set to the players position and then rotates accordingly.

I can't really explain this properly. That probably doesnt make sense, I can't think how to explain it any better.


For some reason, my ambition always seems to beat my ability.
Re: camera rotation [Re: boyax] #265353
05/12/09 09:04
05/12/09 09:04
Joined: Oct 2007
Posts: 11
J
JM89 Offline
Newbie
JM89  Offline
Newbie
J

Joined: Oct 2007
Posts: 11
Look at AUM72 -> "Unanswered questions".

There you can find the answer to your question.

JM

Re: camera rotation [Re: JM89] #265362
05/12/09 10:23
05/12/09 10:23
Joined: Mar 2009
Posts: 276
Cebu City, Philippines
boyax Offline OP
Member
boyax  Offline OP
Member

Joined: Mar 2009
Posts: 276
Cebu City, Philippines
Actually, it's on AUM75. got it!

Thanks


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