First Person Camera
#1

Hello guys, I was wondering if it's possible to make a FP camera script, i was trying but and made it...somehow
Check this out:

Код:
#include a_samp
#include zcmd
newFirstPersonObject[MAX_PLAYERS];
CMD:fp(playerid)
{
	
        FirstPersonObject[playerid] = CreateObject(2052, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); // creates the object
	AttachObjectToPlayer(FirstPersonObject[playerid], playerid, 0.0, 0.12, 0.7, 0.0, 0.0, 0.0); // attach the object to the player
	AttachCameraToObject(playerid, FirstPersonObject[playerid]); // attach the camera to the object
	return 1;
}
I made this code and it works but not in the way i want, if I drive a car the camera goes behind the player, and thats because of the velocity, also if I "duck" i can see the player, so my question is: Is there any way to attach the camera to the players HEAD so if i drive a car the camera stay where the players head is and so on.
Please help me!

See ya'!
Reply


Messages In This Thread
First Person Camera - by Rubennatan - 03.01.2019, 14:45
Re: First Person Camera - by Logic_ - 03.01.2019, 16:53
Re: First Person Camera - by Ramboi - 03.01.2019, 18:10
Re: First Person Camera - by Rubennatan - 03.01.2019, 19:58

Forum Jump:


Users browsing this thread: 2 Guest(s)