Some issues with the idea of creating a vehicle that is based off of player interaction.

Okay, so I have the first person controller and the code set up and ready for a sort of hovering vehicle.

using UnityEngine;
using System.Collections;

public class HoverMotor : MonoBehaviour {

    public float speed = 90f;
    public float turnspeed = 5f;
    public float hoverforce = 65f;
    public float hoverheight = 1f;

    public bool canride = false;

    private float powerInput;
    private float turnInput;
    private Rigidbody carigidbody;

    // Use this for initialization
    void Awake () {

        carigidbody = GetComponent <Rigidbody>();


    // Update is called once per frame
    void Update () {

        powerInput = Input.GetAxis ("Vertical");
        turnInput = Input.GetAxis ("Horizontal");


    void FixedUpdate()
        Ray ray = new Ray (transform.position, -transform.up);
        RaycastHit hit;

        if (Physics.Raycast(ray, out hit, hoverheight))
            float proportionalheight = (hoverheight - hit.distance) / hoverheight;
            Vector3 appliedhoverforce = Vector3.up * proportionalheight * hoverforce;
            carigidbody.AddForce(appliedhoverforce, ForceMode.Acceleration);


        carigidbody.AddRelativeForce(0f, 0f, powerInput * speed);

        carigidbody.AddRelativeTorque(0f, turnInput * turnspeed, 0f);


Fairly simple stuff. However, my player obviously slips and slides around on it as I try and drive it. So I have a few questions.

One, how do I set up a trigger and/or button that will deactivate whether or not my controls are moving this thing unless the player is on it or has clicked something that would signify the wheel.

Had do I lock and unlock a player in position when they click on said wheel or enter said craft.

Please, any responses to this conundrum will be heavily appreciated. I think that this could end up having some nice effects when it's done.

A collider has a property called isTrigger that sets it up so that it doesn't actually collide with incoming objects but merely detects that they've made contact. You could place an invisible trigger collider in the vehicle and add code in an OnTriggerEnter function to detect when the player has entered the vehicle.

As for keeping the player stationary inside the vehicle, you could set its isKinematic property to true (to temporarily disable its physics) and then just parent it to the vehicle object. When you detect that the player wants to leave the vehicle then unparent it again and set isKinematic back to false.