Snowmobile script (being able to drive it)

Okay, apparently I’ve been working on a “Snowmobile Simulator”, creating maps, creating my snowmobiles for weeks. I actually found this car tutorial on the asset store, I’ve tried by changing the scripts in order to make it work for my project, I’ve never managed to get that working. If you look at other games like Modern Warfare 2, whenever you’re escaping the cliff hanger, you do make your way to the extraction point with a snowmobile, this actually gave me an idea making my own snowmobile game on Unity. I have my colliders ready up, just need the scripts in order to make it work.

Also, before I end it here, here’s a few screenshots of my snowmobile:

[19340-unity+2013-12-14+15-43-17-95.png|19340]
[19341-unity+2013-12-14+15-44-35-96.png|19341]

I know this sounds complicated, but I would really appreciate it if you guys could make me a script for my snowmobile :slight_smile:

Thanks!

I would make it a 3 wheeled car that looks like a snowmobile. 2wheels really close together at teh back and 1 for each ski at the front. And add some white particicles to the treds

And to start I would follow a car tutorial.

Add a rigid body to your snow mobile
Set Rigid body drag settings to 1
add this script to your snow mobile

using UnityEngine;
using System.Collections;
 
public class SnowMobileController : MonoBehaviour {
        public float force = 20;
 
        // Use this for initialization
        void Start () {
       
        }
       
        // Update is called once per frame
        void Update () {
// You may have to change rigidbody.AddForce(Vector3.back*force) to the opposite so vector3.back will end up vector3.forward
                if(Input.GetKeyDown("s")){
                rigidbody.AddForce(Vector3.back*force);
                        if(Input.GetKeyDown("w")){
                                rigidbody.AddForce(Vector3.forward*force);
                        }
                                if(Input.GetKeyDown("a")){
                                        rigidbody.AddForce(Vector3.right*force);
                        }
                                        if(Input.GetKeyDown("d")){
                                                rigidbody.AddForce(Vector3.left*force);
        }
                }}}

if you want animations will have to add animation.play under the keystroke for animations, ex.

 if(Input.GetKeyDown("s")){
  rigidbody.AddForce(Vector3.back*force);
        animation.Play("snowmobileforward");

Or if you want the wheel of the snowmobile to rotate
add

public gameobject Wheel1;
public gameobject Wheel2;
public gameobject Wheel3;

to the declaration of the script
&

if(Input.GetKeyDown("s")){
				rigidbody.AddForce(Vector3.back*force);
				Wheel1.transform.Rotate(Vector3.Forward * Time.deltaTime);
				Wheel2.transform.Rotate(Vector3.Forward * Time.deltaTime);
				Wheel3.transform.Rotate(Vector3.Forward * Time.deltaTime);
			}