I’m refactoring my entire project to C#, and I’ve got a small problem I’m hoping you can help me out with quickly. Here is what I WANT to do It works with Vector3.Lerp, but I need it to be Vector2. The startPoint and endPoint are Vector3 values, but I think they should get converted automatically, right? There must be an easy way to do it! I just need to keep the transform.position.z constant.
There’s no point in that because it’s always been available in Unity. Because they’re operators, there’s no need to call functions manually at all. Vector2s and 3s are completely interchangeable (as long as z isn’t necessary).
Thanks Jesse, I suspected that might be the case! As it turns out, I only needed to typecast my comparison of transform.position and endpoint to vector2, and it worked perfectly