W
W
WeBBeW2020-11-17 11:55:23
C++ / C#
WeBBeW, 2020-11-17 11:55:23

How to convert float to Vector3?

public Vector3 offset;
if(IsMaySit == true) offset = (-7.34f, 1.34f, -23.32f);


writes error: Cannot implicitly convert type "(float, float, float)" to "UnityEngine.Vector3"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Maximovich, 2020-11-17
@WeBBeW

new Vector3(x,y,z)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question