Camera Bug

Whenever I try to set a camera using SetPlayerCameraPos & SetPlayerCameraLookat, the map around it doesn't "load" or "focus", thus the vehicles aren't either. What I'm trying to do, is to set a camera at some coordinates to display a spawned vehicle. But due to the map not loading or focus, I can't see the vehicle. If I use /gotocar and teleport to that vehicle while still in the camera mode, the vehicle will load, and the map around it aswell. Is their any fix for this?

This is basically my code:

					new string[128];
					format(string, sizeof(string), "You are viewing the model %s. Use ALT to exit the spectate mode.", VehicleNames[SelectedModel[playerid] - 400]);
					SCM(playerid, COLOR_YELLOW, string);
					new vw = playerid + 100;
					new ran = random(256), ran2 = random(256);
					DSSpawnedCar[playerid] = CreateVehicle(SelectedModel[playerid], 914.2959,-1021.1525,111.5159,359.3285, ran, ran2, -1);
					SetPlayerVirtualWorld(playerid, vw);
					TogglePlayerControllable(playerid, 0);
					SetPlayerCameraPos(playerid, 903.4097,-1011.1171,114.6073);
					SetPlayerCameraLookAt(playerid, 913.9502,-1023.7501,111.9667);
					SpectatingDSV[playerid] = 1;
					SetVehicleVirtualWorld(DSSpawnedCar[playerid], vw);
For some reason, this only happens when spawning a boat or an airplane.
When spawning a car or bike, it will work correctly and it's the exact same code.

TogglePlayerSpectating(playerid, 1);

Originally Posted by Dragony92
Посмотреть сообщение
TogglePlayerSpectating(playerid, 1);
I'll try. Thanks.

Forum Jump:

Users browsing this thread: