public override void InitRigidBody() { Debug.Log("init vehicle"); base.InitRigidBody(); // initialize all wheels dNewtonVehicle vehicle = (dNewtonVehicle)m_Body; foreach (NewtonWheelBody wheel in m_Wheels) { if ((wheel != null) && (wheel.Vechicle == this)) { wheel.CreateTire(); } } }
protected override void CreateBodyAndCollision() { Debug.Log("create actual vehicle"); m_Collision = new NewtonBodyCollision(this); m_Body = new dNewtonVehicle(World.GetWorld(), m_Collision.GetShape(), Utils.ToMatrix(transform.position, transform.rotation), m_Mass); }