// Use this for initialization
    public void Awake()
    {
        m_dummyWheel = new GameObject("DummyWheel").transform;
        m_dummyWheel.transform.parent = this.transform.parent;
        Center = Vector3.zero;

        m_wheelRadius           = 0.5f;
        m_suspensionDistance    = 0.5f;
        m_suspensionCompression = 0.0f;
        Mass = 1.0f;

        m_forwardFriction  = new WheelFrictionCurveSource();
        m_sidewaysFriction = new WheelFrictionCurveSource();

        m_suspensionSpring                = new JointSpringSource();
        m_suspensionSpring.Spring         = 15000.0f;
        m_suspensionSpring.Damper         = 1000.0f;
        m_suspensionSpring.TargetPosition = 0.0f;
    }
예제 #2
0
    // Use this for initialization
    public void Awake()
    {
        //Debug.Log("Awake Called");
        m_dummyWheel = new GameObject("DummyWheel").transform;
        m_dummyWheel.transform.parent = this.transform.parent;
        Center = Vector3.zero;
        m_suspensionCompression = 0f;
        Mass = 1.0f;
        m_wheelAngularVelocity = 0;
        m_wheelRotationAngle   = 0;

        m_forwardFriction  = new WheelFrictionCurveSource();
        m_sidewaysFriction = new WheelFrictionCurveSource();

        m_suspensionSpring                = new JointSpringSource();
        m_suspensionSpring.Spring         = 100000.0f;
        m_suspensionSpring.Damper         = 0f;
        m_suspensionSpring.TargetPosition = 0.0f;
        initEuler = this.transform.localEulerAngles;
        //m_collider = gameObject.AddComponent<SphereCollider>();
    }
예제 #3
0
    // Use this for initialization
    public void Awake()
    {
        //Debug.Log("Awake Called");
        m_dummyWheel = new GameObject("DummyWheel").transform;
        m_dummyWheel.transform.parent = this.transform.parent;
        Center = Vector3.zero;
        m_suspensionCompression = 0f;
        Mass = 1.0f;
        m_wheelAngularVelocity = 0;
        m_wheelRotationAngle = 0;

        m_forwardFriction = new WheelFrictionCurveSource();
        m_sidewaysFriction = new WheelFrictionCurveSource();

        m_suspensionSpring = new JointSpringSource();
        m_suspensionSpring.Spring = 100000.0f;
        m_suspensionSpring.Damper = 0f;
        m_suspensionSpring.TargetPosition = 0.0f;
        initEuler = this.transform.localEulerAngles;
        //m_collider = gameObject.AddComponent<SphereCollider>();
    }