what would be the easiest way to check the player's position once per second.
Vector3 PosPerSeconds()
{
posSeconds += Time.deltaTime;
if (posSeconds >= posSecondsTimer)
{
newCurrentPosition = player.transform.position;
posSeconds = 0;
print ("newCurrentPosition");
}
return newCurrentPosition;
}
I set something up like this to return a position every three seconds. Does this look like it would work?
↧