camera_question

Posted By: Martek

camera_question - 09/20/07 15:10

Hi,

ich habe für mein Spiel Third-Person-Spiel eine function geschreiben, damit die camera, wenn zwischen wand und player etwas befindet, sie nach vorne schwenkt.
Es funktioniert alles super, nur wenn die camera genau in der Wand ist, dann ruckelt alles.
Dies ist mein Code:

function camera_distance()
{
vec_set(temp.x, camera.x);
temp.z -= 50; //Wert muss noch erporbt werden
c_trace(player.x, temp.x, ignore_me + ignore_passable);
if(result == 0)
{
player.skill10 += 4;
}
else
{
player.skill10 -= 8;
}
}

Wie könnte ich das Ruckeln verhindern???

Mfg, Pingulord
Posted By: cro_games

Re: camera_question - 09/21/07 11:15

Could you write that on english?
Posted By: Martek

Re: camera_question - 09/21/07 12:00

Hello,

I programm for my thrid-perso-shooter a function, that trace between the player and the camera. If there is something between them, the camera move to the player.
But if the camera is in wall, it move forward an backward, so all is shacking:)
Here is my code:

function camera_distance()
{
vec_set(temp.x, camera.x);
temp.z -= 50; //Wert muss noch erporbt werden
c_trace(player.x, temp.x, ignore_me + ignore_passable);
if(result == 0)
{
player.skill10 += 4;
}
else
{
player.skill10 -= 8;
}
}

Is there somebody who can help me?

Mfg, Pingulord
Posted By: cro_games

Re: camera_question - 09/21/07 18:25

function camera_distance()
{
trace_mode = ignore_me + ignore_you + ignore_passents + ignore_models + ignore_passable + ignore_sprites + scan_texture;
result = trace(camera.x,player.x);
if(result >= 0.1)
{
player.skill10 += 4;
}
else
{
player.skill10 -= 8;
}
}
Posted By: Martek

Re: camera_question - 09/21/07 19:29

I think that's the same like mine. I tried it, but it dosen't work, or as mine.
So any other idea???

Mfg, Pingulord
Posted By: cro_games

Re: camera_question - 09/22/07 12:17

You can find that script on one old aum try to ask George abou it.
© 2023 lite-C Forums