<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=Camera%3A%3AattachToPedBone</id>
	<title>Camera::attachToPedBone - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=Camera%3A%3AattachToPedBone"/>
	<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Camera::attachToPedBone&amp;action=history"/>
	<updated>2026-07-24T19:45:08Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://rage.grandroleplay.ru/index.php?title=Camera::attachToPedBone&amp;diff=606&amp;oldid=prev</id>
		<title>imported&gt;Rootcause: Replaced HTML with template</title>
		<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Camera::attachToPedBone&amp;diff=606&amp;oldid=prev"/>
		<updated>2018-10-26T13:17:18Z</updated>

		<summary type="html">&lt;p&gt;Replaced HTML with template&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
Attaches a camera to the bone specified.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
camera.attachToPedBone(ped, boneIndex, x, y, z, heading);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;ped:&amp;#039;&amp;#039;&amp;#039; Ped handle or object&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;boneIndex:&amp;#039;&amp;#039;&amp;#039; {{RageType|Int}} ([[Bones|Bone IDs]])&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;x:&amp;#039;&amp;#039;&amp;#039; {{RageType|Float}}&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;y:&amp;#039;&amp;#039;&amp;#039; {{RageType|Float}}&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;z:&amp;#039;&amp;#039;&amp;#039; {{RageType|Float}}&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;heading:&amp;#039;&amp;#039;&amp;#039; {{RageType|Boolean}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
This creates a camera and then sets it active and attaches it to the player&amp;#039;s hand so it stays focused. The camera will not move with the character.&lt;br /&gt;
&lt;br /&gt;
{{ClientsideCode|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let handCamera = mp.cameras.new(&amp;#039;default&amp;#039;, new mp.Vector3(0,  0,  0), new mp.Vector3(0,0,0), 40);&lt;br /&gt;
&lt;br /&gt;
mp.events.add(&amp;quot;handCam&amp;quot;, () =&amp;gt; {&lt;br /&gt;
    let playerPosition = mp.players.local.position&lt;br /&gt;
&lt;br /&gt;
    handCamera.setActive(true);&lt;br /&gt;
    handCamera.attachToPedBone(mp.players.local.handle, 57005, 0, 0, 0, true);&lt;br /&gt;
    handCamera.setCoord(playerPosition.x + 1, playerPosition.y + 1, playerPosition.z);&lt;br /&gt;
    mp.game.cam.renderScriptCams(true, false, 0, true, false);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
{{Camera_definition_c}}&lt;br /&gt;
[[Category:Clientside API]]&lt;br /&gt;
[[Category:Camera API]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Rootcause</name></author>
	</entry>
</feed>