0 registered members (),
1,295
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: STREAK/BEAM not working properly
[Re: uniman]
#311603
02/20/10 22:25
02/20/10 22:25
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
whenever I try to attach the STREAK or BEAM flag to a particle it shows up behind and to the right of the player instead of the assigned position. I am aware that these flags are not available with isometric cameras, however, I am using a simple FPS camera. this is the code,
vec_set(camera.x,player.x); vec_set(camera.y,player.y); vec_set(camera.z,player.z+38); vec_set(camera.pan,player.pan); vec_set(camera.tilt,player.tilt); camera.pan -= 5 * mouse_force.x * time_step; camera.tilt += 3 * mouse_force.y * time_step; if(camera.tilt<-20) { camera.tilt = -20; } if(camera.tilt>40) { camera.tilt = 40; } player.pan = camera.pan; player.tilt = camera.tilt;
the version is 7.80
if anyone can give me a clue as to what is causing this it would be greatly appreciated. vec_set sets Vectors, so:
vec_set(camera.x, player.x);
is the same as
camera.x = player.x; camera.y = player.y; camera.z = player.z;
so you only need
vec_set(camera.x, player.x);
vec_set(camera.pan, player.pan);
camera.z += 38;
the code you've posted so far isn't showing anything at all for particles which you need for the STREAK and BEAM to work
|
|
|
Re: STREAK/BEAM not working properly
[Re: uniman]
#311612
02/20/10 23:48
02/20/10 23:48
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
User
|
User
Joined: Oct 2004
Posts: 900
Lgh
|
if(camera.tilt<-20) { camera.tilt = -20; } if(camera.tilt>40) { camera.tilt = 40; }
try this also instead from above camera.tilt = clamp (camera.tilt, -20, 40); Besides, I miss your particle code.
|
|
|
|