Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, TedMar, dr_panther), 1,049 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
problem defining another view and disable the standard cam #252176
02/16/09 22:11
02/16/09 22:11
Joined: Jun 2007
Posts: 152
Norway
D
Darkyyes Offline OP
Member
Darkyyes  Offline OP
Member
D

Joined: Jun 2007
Posts: 152
Norway
VIEW* cam1_view =
{
layer = 0;

pos_x = player.x - 210 * cos(player.pan);

pos_y = player.y - 210 * sin(player.pan);

size_x = 1050;

size_y = 1680;

arc = 90;

aspect = 1;

ambient = 100;


flags = SHOW;

}

how to activate this cam in lite-c ? :S when i run the game with this code it doesnt follow my player model as the normal camera function would. and how would i make this view have a tilt?
in fact it wont follow the player at all, its just in the center of the level

I dont know how to do it as you might understand by now, but I dont understand anything about the view_create, etc from the manual, perhaps my knowledge of english language is too weak :|

Code:
camera.x = player.x - 210 * cos(player.pan);

camera.y = player.y - 210 * sin(player.pan); 

camera.z = player.z + 130; 
camera.arc = 90;

//camera.tilt = -10; 
camera.tilt = -10;


//camera.pan = player.pan;
camera.pan = player.pan;


this is the code i try to get into another view.


New to lite-c and gamestudio in general, thank you for reading.
Com, A7 v7.7
Re: problem defining another view and disable the standard cam [Re: Darkyyes] #252204
02/17/09 04:28
02/17/09 04:28
Joined: Oct 2008
Posts: 218
Nashua NH
heinekenbottle Offline
Member
heinekenbottle  Offline
Member

Joined: Oct 2008
Posts: 218
Nashua NH
you are calling arithmetic functions in a view definition. If that even compiles, it won't work. it will make the calculation the moment the view is created and never update.

Rather, you need those two trig functions in a while loop so they consistently update:

Code:
while(1)
{
   cam1_view.pos_x = player.x - 210 * cos(player.pan);
   cam1_view.pos_y = player.y - 210 * sin(player.pan);
   wait(1);
}


The rest of the view definition is fine.


I was once Anonymous_Alcoholic.

Code Breakpoint;
Re: problem defining another view and disable the standard cam [Re: heinekenbottle] #252206
02/17/09 04:43
02/17/09 04:43
Joined: Aug 2007
Posts: 74
Mahdi Offline
Junior Member
Mahdi  Offline
Junior Member

Joined: Aug 2007
Posts: 74
You should use something like:

cam1_view.visible=ON;

in another function.


I don't care!
Re: problem defining another view and disable the standard cam [Re: Mahdi] #252218
02/17/09 07:28
02/17/09 07:28
Joined: Jun 2007
Posts: 152
Norway
D
Darkyyes Offline OP
Member
Darkyyes  Offline OP
Member
D

Joined: Jun 2007
Posts: 152
Norway
ok this messes up my point and click movement in so many ways, how do I silence the standard camera function and make only cam1_view audible?

camera.flags &= ~AUDIBLE ?

Last edited by Darkyyes; 02/17/09 08:03.

New to lite-c and gamestudio in general, thank you for reading.
Com, A7 v7.7

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