Posted By: Martek
AUM 46 Morrowing - 09/26/07 11:16
Hi
in the Aum 46 is in Morrowing a function called avoid_obstacles.
I use this function in my Game. But the camera is shacking (I don't know the english word for ruckeln), when the camera is in the wall. How can I fix this???
Mfg, Pingulord
Posted By: George
Re: AUM 46 Morrowing - 09/26/07 18:06
Do you have this problem with the level and code from Morrowing?
Posted By: Martek
Re: AUM 46 Morrowing - 09/26/07 19:08
No. I've made an own level and this is my code:
function camera_distance()
{
c_trace(player.x, camera.x, ignore_me + ignore_passable);
if(result == 0)
{
player.skill10 += 4;
}
else
{
player.skill10 -= 8;
}
}
The Camera only has problems, when it is IN the wall.
Mfg, Pingulord
Posted By: George
Re: AUM 46 Morrowing - 09/29/07 05:20
Did you try to use my (entire) code in your level?
Posted By: Martek
Re: AUM 46 Morrowing - 09/29/07 09:08
If made my code out of your. I only change the trace into c_trace and don't change the alpha chanel.
This is it:
function cam_dist_()
{
vec_set(temp.x, camera.x);
temp.z -= 50;
c_trace(player.x, temp.x, ignore_me + ignore_passable);
if(result == 0)
{
player.cam_dist += 1;
}
else
{
player.cam_dist -= 2;
}
}
I think it's the same as your code.
Mfg, Pingulord
Posted By: George
Re: AUM 46 Morrowing - 10/02/07 06:05
Your code will make the camera shake indeed. Try to use smaller numerical values (0.1 instead of 1, 0.2 instead of 2) and see if this fixes the problem.
Posted By: Martek
Re: AUM 46 Morrowing - 10/02/07 09:06
It works fine, but now the camera is so slowly, that I can see through the wall,
because it takes a long time to come the player.
And I wrote this function, because I want that the camera can't see through the wall:)
Mfg, Pingulord
Posted By: George
Re: AUM 46 Morrowing - 10/02/07 14:58
The best thing to do is to study my code, understand how it works (there's an explanation in the magazine) and then write your own camera code. A painless alternative? Increase those numerical values a bit