Goennigoegoe
Goennigoegoe

Reputation: 1

Roblox. I don't know and can't think of something to get only X and Z coordinate in lookvector

I only need the X and Z coordinates for a look vector in Roblox but i cant think of any way to get only the X and Z coordinates in a look vector.

Upvotes: -1

Views: 380

Answers (1)

kingerman88
kingerman88

Reputation: 533

Since look vector is a vector you should be able to create a new vector using the X and Z components or by multiplying by an XZ vector

local vector = Vector3.new(.5,.5,.5)
vector = Vector3.new(vector.X, 0, vector.Z)

or

local vector = Vector3.new(.5,.5,.5)
vector = vector * Vector3.new(1,0,1)

Upvotes: 1

Related Questions