Vector3: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Gamer3D
m Made this a redirect page.
 
>Mr Doom Bringer
redirect didn't work properly. Made page.
Line 1: Line 1:
#Redirect [[Scripting#Vector3]]
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.
 
==Introduction==
 
The ROBLOX scripting language is [http://www.lua.org Lua 5.1], a concise and efficient scripting language used in games and embedded systems. Documentation on the language can be found at http://www.lua.org/docs.html.
 
With scripts you can inspect and control the behavior of nearly anything in ROBLOX.
 
The usual way to write scripts in ROBLOX is to create a Script object. [[Intro to Scripting: Make a Dance Floor]] is a simple tutorial that teaches you how to create a Script object. To see the Methods, Properties and Events that are currently available for scripting, open [[Roblox Studio]] and click the Class Explorer item under the Help menu.
 
 
All properties are read-only.
{| border="1"
! Property !! Type !! Description
|-
| <code>x</code> || number ||| the x-coordinate
|-
| <code>y</code> || number ||| the y-coordinate
|-
| <code>z</code> || number ||| the z-coordinate
|-
| <code>unit</code> || Vector3 ||| a normalized copy of the vector
|-
| <code>magnitude</code>|| number ||| the length of the vector
|}

Revision as of 15:40, 20 August 2007

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.

Introduction

The ROBLOX scripting language is Lua 5.1, a concise and efficient scripting language used in games and embedded systems. Documentation on the language can be found at http://www.lua.org/docs.html.

With scripts you can inspect and control the behavior of nearly anything in ROBLOX.

The usual way to write scripts in ROBLOX is to create a Script object. Intro to Scripting: Make a Dance Floor is a simple tutorial that teaches you how to create a Script object. To see the Methods, Properties and Events that are currently available for scripting, open Roblox Studio and click the Class Explorer item under the Help menu.


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