Is there a way to move a character to touch a certain object instantly if they interact with or around it? Hypothetical example would be the character's standing by a motorcycle, but the motorcycle has spawned randomly, so it's coordinates can't be scripted. How do I move character TO the cycle when pushing certain button?
Given your motorcycle is named Motorcycle:
if (Input.GetKeyDown(KeyCode.F))
{
transform.position = GameObject.Find("Motorcycle").transform.position;
}
Press F and it should position onto the Motorcycle.