Hi,
When I place an object in the scene and I press play to play the game, the object changed place. I dont’t know why that is. I also added a code that they can move up and down. Sometimes they change place and sometimes not… .
Here are some screenshots:
and here is the code for moving them:
float originalY;
public float floatStrength = 1;
void Start()
{
this.originalY = this.transform.position.y;
}
void Update()
{
transform.position = new Vector3(transform.position.x,
originalY + ((float)Math.Sin(Time.time) * floatStrength),
transform.position.z);
}
can someone help me with this?
Thank you in advance
Cynni

