Hello. I am making a simple endless running game just to learn using unity. My character is static. I use texture offset to create the running illusion.
Now i have a spawn script that spawns some gameobjects in front of the player. All is working fine. But i really don’t know to synchronize the acceleration of my texture with gameobjecs acceleraion.
float speed = 0.8f;
[...]
void Update () {
speed += 0.005f;
float offset = Time.time * speed;
renderer.material.mainTextureOffset = new Vector2(0, -offset);
}
It is better to use kinematic object with moveposition, non kinematic with addforce? or what?
Thanks