C0 (Property): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Blocco spelling |
>Camoy format |
||
Line 1: | Line 1: | ||
<onlyinclude>{{Property | |||
|name = C0 | |||
name = C0 | |||
|property = [[CFrame]] ''C0'' | |property = [[CFrame]] ''C0'' | ||
|description = Determines how the offset point is attached to [[ | |description = Determines how the offset point is attached to [[Part0]]. | ||
|object = JointInstance | |object = JointInstance | ||
}}</onlyinclude> | |||
{{clear floats}} | |||
== Description == | == Description == | ||
C0 is the position aspect of the orientation between two parts in a weld. Part0 and Part1 move accordingly to this value, which denotes their respective positions. See Also [[ | C0 is the position aspect of the orientation between two parts in a weld. Part0 and Part1 move accordingly to this value, which denotes their respective positions. See Also [[C1]]. | ||
{{Example|This is an example of the use of C0.<pre> | |||
<pre> | |||
weld = Instance.new( "Weld" ) | weld = Instance.new( "Weld" ) | ||
weld.Parent = BrickA -- must be in Workspace or JointsService to function. | weld.Parent = BrickA -- must be in Workspace or JointsService to function. | ||
Line 21: | Line 18: | ||
weld.C1 = CFrame.new() -- default | weld.C1 = CFrame.new() -- default | ||
weld.Part1 = BrickB | weld.Part1 = BrickB | ||
</pre> | </pre>}} | ||
The code sets the weld's position to be 10 studs in front of the brick it's attached to. So, if BrickA and BrickB are welded together by that weld, B would be 10 studs in front of BrickB. Try it for yourself! | The code sets the weld's position to be 10 studs in front of the brick it's attached to. So, if BrickA and BrickB are welded together by that weld, B would be 10 studs in front of BrickB. Try it for yourself! | ||
[[Category:Properties]] | |||
[[ |
Revision as of 14:31, 29 January 2011
C0 | |
Property | CFrame C0 |
Description | Determines how the offset point is attached to Part0. |
Member of | JointInstance |
Description
C0 is the position aspect of the orientation between two parts in a weld. Part0 and Part1 move accordingly to this value, which denotes their respective positions. See Also C1.
Example
This is an example of the use of C0.weld = Instance.new( "Weld" ) weld.Parent = BrickA -- must be in Workspace or JointsService to function. weld.C0 = CFrame.new( Vector3.new( 0 , 0 , 10 ) ) weld.Part0 = BrickA weld.C1 = CFrame.new() -- default weld.Part1 = BrickB
The code sets the weld's position to be 10 studs in front of the brick it's attached to. So, if BrickA and BrickB are welded together by that weld, B would be 10 studs in front of BrickB. Try it for yourself!