camera is too far !
#1

I made hippie car interior.(enter as passenger and it teles to interior) problem is that it is so small that i can see outside the room with my camera. When i press v its okay.
How to make a script:
what shortens distance between the player and the camera when i enter the vechile and if player exits the car, it goes normal again?
Reply
#2

Errr...

proovi midagi sellist vb SetPlayerFacingAngle(playerid,Kordinaadid);
SetPlayerCameraPos(playerid,Kordinaadid);
SetPlayerCameraLookAt(playerid,Kordinaadid);


try something like this :
SetPlayerFacingAngle(playerid,Cords);
SetPlayerCameraPos(playerid,Cords);
SetPlayerCameraLookAt(playerid,Cords);
Reply
#3

Ok this can be done simply with one varriable. ..
On the top of the script do something like this . .

Код:
IsInInterior[MAX_PLAYERS] = 0;
If your interior code doesnt have that already add it.
When he enters the interior do this. .
Код:
IsInInterior[playerid] = 1;
When he exits the interior set it back to 0

Now add a timer to OnGamemodeInit
Код:
SetTimerEx("CameraCheck", 100, 1, "i", playerid);
Then .. .

EDIT:
Код:
forward CameraCheck(playerid);

public CameraCheck(playerid)
{
if(IsInInterior[playerid] == 1)
{
new Float:X, Float:Y, Float:Z;
SetCameraPos(playerid, X-0.3,Y,Z);
SetCameraLookAt(playerid, X, Y, Z);

} else {

if(IsInInterior[playerid] == 0)
{
SetCameraPos(playerid, X, Y, Z);
SetCameraLookAt(playerid, X, Y, Z);
return 1;
}
Do soemthing like that, It is untested :P
Glad to help; if it doesnt work then, im glad to give you ideas :P
Reply
#4

Thanks for your answers.. i will test it shortly . until i fix converting problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)