0 registered members (),
1,397
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Split screen?
[Re: themuzikman]
#437263
02/13/14 11:59
02/13/14 11:59
|
Joined: Dec 2011
Posts: 1,823 Netherlands
Reconnoiter
Serious User
|
Serious User
Joined: Dec 2011
Posts: 1,823
Netherlands
|
Maybe you already fixed this themuzikman, otherwise just add this in the while in your player code;
vec_set (camera.x, vector (-200, 50, 70)); // simple camera code, play with these values
vec_rotate (camera.x, my.pan); // this example creates a camera that sits 200 quants behind the player and 50 quants to the left
vec_add (camera.x, my.x); // and 70 quants above its origin
camera.pan = my.pan; // the camera will have the same pan angle with the player
vec_set (camera2.x, vector (-200, -50, 70)); // simple camera code, play with these values
vec_rotate (camera2.x, my.pan); // this example creates a camera that sits 200 quants behind the player and 50 quants to the right
vec_add (camera2.x, my.x); // and 70 quants above its origin
camera2.pan = my.pan; // the camera will have the same pan angle with the player
|
|
|
Re: Split screen?
[Re: Reconnoiter]
#437315
02/14/14 03:43
02/14/14 03:43
|
Joined: Jan 2012
Posts: 36
themuzikman
OP
Newbie
|
OP
Newbie
Joined: Jan 2012
Posts: 36
|
Thank you very much! I tried this and it seems to function properly except that camera 2 doesn't follow my mouse movement on the Y axis... I thought if I added
vec_set(camera.y,player.y);
vec_add(camera.y,offset1);
etc..
that it might work, but it makes no difference at all... Just one step away from getting this thing to work! Haha
|
|
|
Re: Split screen?
[Re: themuzikman]
#437339
02/14/14 11:38
02/14/14 11:38
|
Joined: Dec 2011
Posts: 1,823 Netherlands
Reconnoiter
Serious User
|
Serious User
Joined: Dec 2011
Posts: 1,823
Netherlands
|
Ah yeah the problem is that the code still only takes the player.pan into account. Try this (I have tested it, it should work with you to):
ANGLE player_angle;
player_angle.pan = player.pan;
player_angle.tilt = player.tilt; //or camera.tilt, depends on what you move with mouse_force.y
player_angle.roll = player.roll;
vec_set (camera.x, vector (-200, 50, 70)); // simple camera code, play with these values
vec_rotate (camera.x, player_angle); // this example creates a camera that sits 200 quants behind the player and 50 quants to the left
vec_add (camera.x, player.x); // and 70 quants above its origin
camera.pan = player.pan;
camera.tilt = player.tilt; //you can leave this out if you move camera.tilt directly through mouse_force.y
vec_set (camera2.x, vector (-200, -50, 70)); // simple camera code, play with these values
vec_rotate (camera2.x, player_angle); // this example creates a camera that sits 200 quants behind the player and 50 quants to the right
vec_add (camera2.x, player.x); // and 70 quants above its origin
camera2.pan = player.pan;
camera2.tilt = player.tilt; //you can leave this out if you move camera.tilt directly through mouse_force.y
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|