Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
4 registered members (fogman, Grant, AndrewAMD, juanex), 989 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Roll affecting tilt angle? #187506
03/08/08 05:35
03/08/08 05:35
Joined: Aug 2003
Posts: 716
Canada, Toronto
thegamedesigner Offline OP
User
thegamedesigner  Offline OP
User

Joined: Aug 2003
Posts: 716
Canada, Toronto
I started making a small flight sim game:


action plane1_act
{
my.health = 100;
while(1)
{

//controls
my.roll += (key_d - key_a) * 2 * time;
my.tilt += (key_s - key_w) * 2 * time;

//movement
c_move(my,vector(32 * time,0,0),nullvector,ignore_passable);

//camera
vec_set(camera.x,vector(-1900,-1900,1300));//x,y,z,offsets
vec_rotate(camera.x,vector(my.pan,0,0));//based on pan AND tilt
vec_add(camera.x,my.x);

vec_set(temp.x,my.x);
vec_sub(temp.x, camera.x);
vec_to_angle(camera.pan,temp);

wait(1);
}
}

Very basic. However, when I roll to the side and then tilt up or down, my plane (no matter the roll angle) tilts straight up and down.

I know I solved this before, but I can't find the answer.


My games - www.spyeart.com
Re: Roll affecting tilt angle? [Re: thegamedesigner] #187507
03/08/08 05:46
03/08/08 05:46
Joined: Aug 2003
Posts: 716
Canada, Toronto
thegamedesigner Offline OP
User
thegamedesigner  Offline OP
User

Joined: Aug 2003
Posts: 716
Canada, Toronto
Sorry, never mind, I found out how to use c_rotate.


My games - www.spyeart.com

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