You have 2 errors.
It looks like you are trying to call the constructor to create a new Vector3. The issues is that there are no constructors that take a Vector3 as an argument (you can copy it, but that's not the same).
//you're basically doing
velocity = new Vector3( someVec3 );
Which is simply not allowed, fortunately it's a very easy fix.
myTransform.rigidbody.velocity = Vector3(lookDir.normalize() * currentSpeed * Time.deltaTime);
myTransform.rigidbody.velocity = lookDir.normalized * currentSpeed * Time.deltaTime;
//deleted the constructor call.
//also changed normalize() to normalized. You can also use Vector3.Normalize(lookDir).
↧