What is the difference between Vector3 and Transform?

I wanna understand when to use which and at the moment they seem interchangeable, but I reckon that’s not the case. Any help clarifying that?

They’re not at all related. The transform has a position property though (among others), that is of the Vector3 type, and that’s probably one of the properties of the transform that you most commonly play with? That might be where the confusion is coming in?

As SteveJ mentioned. A Vector3 can be retrieved through transform.position, and transform.localPosition(I believe). Although they are related, they are very different things!

A Vector3 is simply an object containing, up to 3 number variables. (At least normally they are numbers)

Transform, is a larger object containing many more functions/data as it holds position/rotation/scale, as well as calculations for some other features you might use Transform for.

1 Like

When in doubt, check the docs. Compare Transform’s kajillion members and methods to Vector3’s handful.

Agreed documentation helps a ton, I usually keep it open for quick reference. Always a good book on hand when coding!