Vector3: Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Nate m Vector3 is not an object. |
>Mindraker feel free to alter this however you want... |
||
Line 16: | Line 16: | ||
| <code>magnitude</code>|| number ||| the length of the vector | | <code>magnitude</code>|| number ||| the length of the vector | ||
|} | |} | ||
<b>Position:</b> <b>r</b><i>t</i> = <i>x(t)</i><b>i</b> + <i>y(t)</i><b>j</b> +<i>z(t)</i><b>k</b><br> | |||
<b>Velocity:</b> <b>v</b><i>t</i> = (<i>d</i><b>r</b>/<i>dt</i>) = (<i>dx/dt</i>)<b>i</b> + (<i>dy/dt</i>)<b>j</b> + (<i>dz/dt</i>)<b>k</b> | |||
<b>Speed:</b> ||<b>v</b><i>(t)</i>|| = sqrt((<i>dx/dt</i>)^2 + (<i>dy/dt</i>)^2 + (<i>dz/dt</i>)^2) | |||
<b>Acceleration:</b> <b>a</b><i>(t)</i> = <i>d</i><b>v</b>/dt = <i>d^2</i><b>r</b>/<i>dt^2</i> + (<i>(d^2x)/(dt^2)</i>)<b>i</b> + (<i>(d^2y)/(dt^2)</i>)<b>j</b> + (<i>(d^2z)/(dt^2)</i>)<b>k</b> |
Revision as of 22:25, 29 September 2008
A Vector3 has three values, an X ordinate, Y ordinate and Z ordinate. It represents a position in 3D space, and can be in World coordinates, Object coordinates, or anything that needs to have a set of three values in order to function.
All properties are read-only.
Property | Type | Description |
---|---|---|
x |
number | the x-coordinate |
y |
number | the y-coordinate |
z |
number | the z-coordinate |
unit |
Vector3 | a normalized copy of the vector |
magnitude |
number | the length of the vector |
Position: rt = x(t)i + y(t)j +z(t)k
Velocity: vt = (dr/dt) = (dx/dt)i + (dy/dt)j + (dz/dt)k
Speed: ||v(t)|| = sqrt((dx/dt)^2 + (dy/dt)^2 + (dz/dt)^2)
Acceleration: a(t) = dv/dt = d^2r/dt^2 + ((d^2x)/(dt^2))i + ((d^2y)/(dt^2))j + ((d^2z)/(dt^2))k