using UnityEngine;
using System.Collections;
public class Car : MonoBehaviour {
public Transform playerController;
public Transform ufoVehicle;
// Update is called once per frame
void Update () {
if (Input.GetKeyDown (KeyCode.E)) {
playerController.transform.parent = ufoVehicle.transform;
playerController.transform.parent.position = ufoVehicle.transform.position;
}
}
}
What I want to do is change my character’s position and set it to a parent of a UFO Vehicle I created, so I can make a vehicle that can drive.