I'm trying to move a object between 2 points in unity3d, seems there are lot of answers to this topic but i always get a error that I don't know how to solve when I try to solve this, so actually I tried to do this:
void Update () {
transform.position = Vector3(Mathf.PingPong(Time.time,10.0f), transform.position.y, transform.position.z);
}
I get this error:
Assets/PingPong.cs(7,38): error CS0119: Expression denotes a
type
, where avariable
,value
ormethod group
was expected
What am I doing wrong? I'm a beginner need some help with this stuff :/