Moving Objects in Unity

Aus hyperdramatik
Version vom 23. Oktober 2019, 13:28 Uhr von TomasM (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „'''Unity : How to move an object in 3D space?''' There are different ways to move an object within 3D space. '''A) transform.position''' '''transform:''' P…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

Unity : How to move an object in 3D space?

There are different ways to move an object within 3D space.

A) transform.position

transform: Position, rotation and scale of an object.

transform.position: The position property of a GameObject's Transform. Gives the object a new position.

'Vector:' A class to describe a two or three dimensional vector, a vector is an entity that has both magnitude and direction. A Vector3(float x, float y, float z) is a Unity C# struct representing points and vectors in 3D space.