Hi.
I made a topic here recently and learned a lot, including how to better state some of the things I’m trying to do.
I’m looking for one thing here.
In my current code:
else if (Input.GetKeyDown(KeyCode.RightShift))
if (transform.position.z < 0)
playertrn.Translate(0.0f, 0.0f, 6.0f, Space.World);
else if (Input.GetKeyDown(KeyCode.RightShift))
if (transform.position.z > 0)
playertrn.Translate(0.0f, 0.0f, -6.0f, Space.World);
The object is snapping immediately to the destination position. I’ve seen some guides about perhaps using lerps or a pingpong controller or something but I feel like there may be a way to alter the above script so that the object knows to move to that point at a certain speed rather than instantly.
Any ideas? Thanks.