Why does this not put the camera in the right place
#1

Why does this not put the camera where i want it

It is meant to be a place where i can see a certain place but instead all i can is is clouds and i can walk but i can see my self moving on the mini map

pawn Код:
SetPlayerCameraPos(playerid, 240.124801, 121.756500, 1004.287475);
SetPlayerCameraLookAt(playerid, 240.124801, 121.756500, 1004.287475);
SetPlayerFacingAngle(playerid, 90.0);
Please help

Thanks
Reply
#2

You are using the same cord's for SetPlayerCameraPos and SetPlayerCameraLookAt, that might be your problem.

https://sampwiki.blast.hk/wiki/SetPlayerCameraLookAt
Reply
#3

Quote:
Originally Posted by Stigg
Посмотреть сообщение
You are using the same cord's for SetPlayerCameraPos and SetPlayerCameraLookAt, that might be your problem.

https://sampwiki.blast.hk/wiki/SetPlayerCameraLookAt
So what should i change

Please help

Thanks
Reply
#4

because you are not using SetPlayerPos(playerid,x,y,z);

pawn Код:
SetPlayerPos(playerid, 53.643161, 1211.244995, 18.890058);
     SetPlayerFacingAngle(playerid, 176.224090);
     SetPlayerCameraLookAt(playerid, 53.643161, 1211.244995, 18.890058);
     SetPlayerCameraPos(playerid, 53.643161 + (10 * floatsin(-176.224090, degrees)), 1211.244995 + (10 * floatcos(-176.224090, degrees)), 18.890058);
this is my request class position and a good example
Reply
#5

Quote:
Originally Posted by Euan Hughes
Посмотреть сообщение
So what should i change

Please help

Thanks
Read the info in the link in my previous post.
Reply
#6

Quote:
Originally Posted by Stigg
Посмотреть сообщение
Read the info in the link in my previous post.
My camera is facing into a interior do i need to set the virtual world or anything

Please help

Thanks
Reply
#7

Try:

https://sampwiki.blast.hk/wiki/SetPlayerInterior
https://sampwiki.blast.hk/wiki/InteriorIDs
Reply
#8

an interior?

pawn Код:
SetPlayerCameraPos(playerid, 240.124801, 121.756500, 1004.287475);
SetPlayerCameraLookAt(playerid, 240.124801, 121.756500, 1004.287475);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerInterior(playerid,hereinteriorid);
Reply
#9

Quote:
Originally Posted by XStormiest
Посмотреть сообщение
an interior?

pawn Код:
SetPlayerCameraPos(playerid, 240.124801, 121.756500, 1004.287475);
SetPlayerCameraLookAt(playerid, 240.124801, 121.756500, 1004.287475);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerInterior(playerid,hereinteriorid);
I tried doing this but it still did not work

pawn Код:
new vw = GetPlayerVirtualWorld(playerid);
new interior = GetPlayerInterior(playerid);

SetPlayerVirtualWorld(playerid, vw);
SetPlayerInterior(playerid, interior);
SetPlayerPos(playerid, 240.124801, 121.756500, 1004.287475);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraLookAt(playerid, 240.124801, 121.756500, 1004.287475);
SetPlayerCameraPos(playerid, 240.124801 + (10 * floatsin(-90.0, degrees)), 121.756500 + (10 * floatcos(90.0, degrees)), 1004.287475);
Please help

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)