<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Alaa</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Alaa"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Alaa"/>
	<updated>2026-04-06T04:43:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetCameraMatrix&amp;diff=50596</id>
		<title>SetCameraMatrix</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetCameraMatrix&amp;diff=50596"/>
		<updated>2017-04-09T01:12:50Z</updated>

		<summary type="html">&lt;p&gt;Alaa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function sets the camera's position and direction. The first three arguments are the point at which the camera lies, the last three are the point the camera faces (or the point it &amp;quot;looks at&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Calling this function takes the camera's focus away from the player and sets the camera in a fixed position and rotation. The camera's focus can be brought back to the player using the [[setCameraTarget]] function.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setCameraMatrix ( player thePlayer, float positionX, float positionY, float positionZ [, float lookAtX, float lookAtY, float lookAtZ, float roll = 0, float fov = 70 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[player]]:setCameraMatrix|cameraMatrix|getCameraMatrix}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The player whose camera is to be changed.&lt;br /&gt;
*'''positionX:''' The x coordinate of the camera's position.&lt;br /&gt;
*'''positionY:''' The y coordinate of the camera's position.&lt;br /&gt;
*'''positionZ:''' The z coordinate of the camera's position.&lt;br /&gt;
*'''{{New feature/item|3.0141|1.4.1|7005|Instead of six coordinates, or two vectors, a Matrix can be supplied.}}'''&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''lookAtX:''' The x coordinate of the point the camera faces.&lt;br /&gt;
*'''lookAtY:''' The y coordinate of the point the camera faces.&lt;br /&gt;
*'''lookAtZ:''' The z coordinate of the point the camera faces.&lt;br /&gt;
*'''roll:''' The camera roll angle, -180 to 180. A value of 0 means the camera sits straight, positive values will turn it counter-clockwise and negative values will turn it clockwise. -180 or 180 means the camera is upside down.&lt;br /&gt;
*'''fov:''' the field of view angle, 0 to 180. The higher this value is, the more you will be able to see what is to your sides.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setCameraMatrix ( float positionX, float positionY, float positionZ [, float lookAtX, float lookAtY, float lookAtZ, float roll = 0, float fov = 70 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP|This is under the static class '''Camera'''|Camera.setMatrix|matrix|getCameraMatrix}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''positionX:''' The x coordinate of the camera's position.&lt;br /&gt;
*'''positionY:''' The y coordinate of the camera's position.&lt;br /&gt;
*'''positionZ:''' The z coordinate of the camera's position.&lt;br /&gt;
*'''{{New feature/item|3.0141|1.4.1|7005|Instead of six coordinates, or two vectors, a Matrix can be supplied.}}'''&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''lookAtX:''' The x coordinate of the point the camera faces.&lt;br /&gt;
*'''lookAtY:''' The y coordinate of the point the camera faces.&lt;br /&gt;
*'''lookAtZ:''' The z coordinate of the point the camera faces.&lt;br /&gt;
*'''roll:''' The camera roll angle, -180 to 180. A value of 0 means the camera sits straight, positive values will turn it counter-clockwise and negative values will turn it clockwise. -180 or 180 means the camera is upside down.&lt;br /&gt;
*'''fov:''' the field of view angle, 0 to 180. The higher this value is, the more you will be able to see what is to your sides.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the arguments are valid, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
هذا الكود يضع اتجاه ومكان الكاميرا علي علامة &amp;quot; Vinewood &amp;quot; في مدينة لوس سانتوس لاي لاعب يدخل الي السيرفر .&lt;br /&gt;
&amp;lt;section class=&amp;quot;server&amp;quot; name=&amp;quot;Server script&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function setCameraOnPlayerJoin()&lt;br /&gt;
     -- slowly fade the camera in to make the screen visible&lt;br /&gt;
     fadeCamera(source, true, 5)&lt;br /&gt;
     -- set the player's camera to a fixed position, looking at a fixed point&lt;br /&gt;
     setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, root, setCameraOnPlayerJoin)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Camera functions}}&lt;/div&gt;</summary>
		<author><name>Alaa</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetCameraMatrix&amp;diff=50595</id>
		<title>SetCameraMatrix</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetCameraMatrix&amp;diff=50595"/>
		<updated>2017-04-09T01:11:32Z</updated>

		<summary type="html">&lt;p&gt;Alaa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
هذه الوظيفة تغير مكان الكاميرا. اول ثلاثة ارقمنات يعبرون عن احداثيات مكان الكاميرا, اخر ثلاثة ارقمنات يعبرون عن مكان اتجاه الكاميرا اي يعني ماتنظر اليه الكاميرا.&lt;br /&gt;
&lt;br /&gt;
'''ملحوظة:''' استدعاء هذه الوظيفة سيحرك كاميرا الاعب الي موضع واتجاه مختلف لاعاده الكاميرا الي الاعب يمكنك استخدام وظيفة [[setCameraTarget]]&lt;br /&gt;
==الصيغة==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setCameraMatrix ( player thePlayer, float positionX, float positionY, float positionZ [, float lookAtX, float lookAtY, float lookAtZ, float roll = 0, float fov = 70 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[player]]:setCameraMatrix|cameraMatrix|getCameraMatrix}}&lt;br /&gt;
===الارقمنات المطلوبة=== &lt;br /&gt;
*'''thePlayer:''' الاعب الذي ستتغير مكان او اتجاه الكاميرا لديه.&lt;br /&gt;
*'''positionX:''' احداثي اكس لمكان الكاميرا.&lt;br /&gt;
*'''positionY:''' احداثي واي لمكان الكاميرا.&lt;br /&gt;
*'''positionZ:''' احداثي زد لمكان الكاميرا.&lt;br /&gt;
*'''{{New feature/item|3.0141|1.4.1|7005|Instead of six coordinates, or two vectors, a Matrix can be supplied.}}'''&lt;br /&gt;
&lt;br /&gt;
===الارقمنات الاختيارية=== &lt;br /&gt;
*'''lookAtX:''' احداثي اكس لاتجاه الكاميرا.&lt;br /&gt;
*'''lookAtY:''' احداثي واي لاتجاه الكاميرا.&lt;br /&gt;
*'''lookAtZ:''' احداثي زد لاتجاه الكاميرا.&lt;br /&gt;
*'''roll:''' زاوية تمايل الكاميرا, من -180 ال 180. اذا كانت القيمة ب 0 ستكون الكاميرا مستقيمة, القيم الإيجابية سوف تتحول عكس اتجاه عقارب الساعة والقيم السلبية سوف تتحول في اتجاه عقارب الساعة. -180 او 180 تعني ان الكاميرا ستكون راس علي عقب.&lt;br /&gt;
*'''fov:''' مجال زاوية الرؤية, 0 الي 180 . كلما ارتفعت هذه القيمة , كلما استطعت رؤية مجال اكبر&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setCameraMatrix ( float positionX, float positionY, float positionZ [, float lookAtX, float lookAtY, float lookAtZ, float roll = 0, float fov = 70 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP|This is under the static class '''Camera'''|Camera.setMatrix|matrix|getCameraMatrix}}&lt;br /&gt;
&lt;br /&gt;
===الارقمنات المطلوبة=== &lt;br /&gt;
*'''positionX:''' احداثي اكس لمكان الكاميرا.&lt;br /&gt;
*'''positionY:''' احداثي واي لمكان الكاميرا.&lt;br /&gt;
*'''positionZ:''' احداثي زد لمكان الكاميرا.&lt;br /&gt;
*'''{{New feature/item|3.0141|1.4.1|7005|Instead of six coordinates, or two vectors, a Matrix can be supplied.}}'''&lt;br /&gt;
&lt;br /&gt;
===الارقمنات الاختيارية=== &lt;br /&gt;
*'''lookAtX:''' احداثي اكس لاتجاه الكاميرا.&lt;br /&gt;
*'''lookAtY:''' احداثي واي لاتجاه الكاميرا.&lt;br /&gt;
*'''lookAtZ:''' احداثي زد لاتجاه الكاميرا.&lt;br /&gt;
*'''roll:''' زاوية تمايل الكاميرا, من -180 ال 180. اذا كانت القيمة ب 0 ستكون الكاميرا مستقيمة, القيم الإيجابية سوف تتحول عكس اتجاه عقارب الساعة والقيم السلبية سوف تتحول في اتجاه عقارب الساعة. -180 او 180 تعني ان الكاميرا ستكون راس علي عقب.&lt;br /&gt;
*'''fov:''' مجال زاوية الرؤية, 0 الي 180 . كلما ارتفعت هذه القيمة , كلما استطعت رؤية مجال اكبر&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the arguments are valid, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==مثال==&lt;br /&gt;
هذا الكود يضع اتجاه ومكان الكاميرا علي علامة &amp;quot;فاين وود&amp;quot; في مدينة لوس سانتوس لاي لاعب يدخل الي السيرفر :&lt;br /&gt;
&amp;lt;section class=&amp;quot;server&amp;quot; name=&amp;quot;Server script&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function setCameraOnPlayerJoin()&lt;br /&gt;
     -- تتلاشي الكاميرا ببطئ لتجعل الشاشة مرئية&lt;br /&gt;
     fadeCamera(source, true, 5)&lt;br /&gt;
     -- تضع كاميرا الخاصة بلاعب ف مكان معين, وتنظر الي اتجاه معين&lt;br /&gt;
     setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, root, setCameraOnPlayerJoin)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==انظر ايضا==&lt;br /&gt;
{{Camera functions}}&lt;/div&gt;</summary>
		<author><name>Alaa</name></author>
	</entry>
</feed>