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,038 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 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 | 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