Vous êtes sur la page 1sur 2

Classe

public var forward: Vector3;


public var up: Vector3;

The blue axis of the transform in world space.

The green axis of the transform in world space.

public var right: Vector3;


The red axis of the transform in world space.
public var parent: Transform;

public var position: Vector3;

The parent of the transform.

The position of the transform in world space.

public
var rotation: Quaternion;

The rotation of the transform in world space stored as a Quaternion.

public

Parameters

function LookAt(target: Tran

Transform :

sform, worldUp: Vector3 =

target

Object to point towards.

worldUp

Vector specifying the upward direction.

Vector3.up): void;

Position, rotation and


scale of an object.

Rotates the transform so the forward vector points at /target/'s current position.

public
function Rotate(eulerAngles:
Vector3, relativeTo: Space
= Space.Self): void;

Applies a rotation of /eulerAngles.z/ degrees around the z axis, /eulerAngles.x/


degrees around the x axis, and /eulerAngles.y/ degrees around the y axis (in that
order).

public
function TransformDirection

Transforms direction from local space to world space.

(direction: Vector3): Vector3;


public
function Translate(translatio
n: Vector3, relativeTo: Spac

Moves the transform in the direction and distance of translation.

e = Space.Self): void;

Rigidbody:

public

Control of an object's

ctor3, mode: ForceMode =

position through physics

function AddForce(force: Ve

Adds a force to the rigidbody. As a result the rigidbody will start moving.

ForceMode.Force): void;

simulation.
public var velocity: Vector3;
The velocity vector of the rigidbody.

Vector3 :
Representation of 3D
vectors and points.

public static var back: Vector3;


public static var down: Vector3;
public static var forward: Vector3;
public static var right: Vector3;

public static var up: Vector3;

public var magnitude: float;

Returns the length of this vector (Read Only).


The length of the vector is square root of (x*x+y*y+z*z).

public var normalized: Vector3;


Returns this vector with a magnitude of 1
public static
function Slerp(from: Vector3, to: V

Spherically interpolates between two vectors.

ector3, t: float): Vector3;

Vector3 :
Representation of 3D
vectors and points.

public static
function Lerp(from: Vector3, to: Ve

Linearly interpolates between two vectors.

ctor3, t: float): Vector3;


public
function SetLookRotation(view: V
ector3, up: Vector3 = Vector3.up):

view

The direction to look in.

up

The vector that defines in which direction up is.

void;

Creates a rotation with the specified forward and upwards directions.

Vous aimerez peut-être aussi