Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (TedMar, AndrewAMD, fairtrader), 578 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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