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,209 guests, and 0 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.genius #250881
02/10/09 13:44
02/10/09 13:44
Joined: Sep 2005
Posts: 75
CA, Orange County
Gerrit Offline OP
Junior Member
Gerrit  Offline OP
Junior Member

Joined: Sep 2005
Posts: 75
CA, Orange County
Hi everyone,
I am designing a game where the player is a dog (I have ENTITY* dog_player; defined at the beginning of the program)
The statements below work fine except that I continue to see the dog! I single stepped through the code and the dog does dissapear when executing the first line "camera.genius=dog_player;" but the dog re-appears when the program executes "camera.y -= (15 * sin(dog_player.pan);". I assumed that this line somehow affected the camera so I added a last line "camera.genius=dog_player;" (just to test) but to no avail the dog remains visible....

Any suggestions?

camera.genius=dog_player;
vec_set(camera.x,dog_player.x);
camera.z += 5;
camera.arc=20;
camera.tilt -=25;
camera.pan= dog_player.pan;
camera.y -= (15 * sin(dog_player.pan));
camera.x -= (15 * sin(dog_player.pan));
camera.genius=dog_player;

Re: Camera.genius [Re: Gerrit] #251004
02/11/09 07:53
02/11/09 07:53
Joined: Nov 2008
Posts: 28
Athens, Greece
NeoJT Offline
Newbie
NeoJT  Offline
Newbie

Joined: Nov 2008
Posts: 28
Athens, Greece
Hi Gerrit.

the camera.genius work fine...
The entity is INVISIBLE ONLY if the camera position is INSIDE the entity (like 1st person).

When program execute "camera.y -= (15 * sin(dog_player.pan));" send the camera outside from the entity and make the dog_player VISIBLE.

Re: Camera.genius [Re: NeoJT] #251441
02/13/09 04:12
02/13/09 04:12
Joined: Sep 2005
Posts: 75
CA, Orange County
Gerrit Offline OP
Junior Member
Gerrit  Offline OP
Junior Member

Joined: Sep 2005
Posts: 75
CA, Orange County
NeoJT

I did not realize that the camera has to be in the entity for camera.genius to work. Now it makes sence.
Thank you for your help
Gerrit


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