Need help to, make my longboard drive.

Okay, im just going to say it like it is :slight_smile: I like to make 3d objects, in 3ds max and make enviroments. I want to try just for fun, to make a longboard game. I made a small road you can drive on, and i made a longboard in unity. What i need now, is to make it drive. Scripting is not what im focusing, on and since i don’t have a team, i need to get the scripts myself :slight_smile: The project, is just for testing, and will not be something im going to earn money on. And if i want to do that, im just going to use a different script or give credits to you :slight_smile: Ive tried toconnect the scripts from the car tutorial to my board but it doesen’t work. Do anyone have a script with many variables so i can, adjust, the acceleration, speed, turn speed, etc.
Thx :slight_smile:

2 Answers

2

The only thing you need actually is to get familiar with the Rigidbody functions and connect Input to it.

For instance, add a rigidbody to your longboard and try adding force over time with the inputs:

// Force forward, multiplied with magic number
var vertical : float = Input.GetAxis("Vertical")*50;

// Force sideways, multiplied with magic number
var horizontal : float = Input.GetAxis("Horizontal")*5;

// Add force to Rigidbody, take fixed delta time into account to stay concise on all platforms
rigidbody.AddForce(horizontal*Time.fixedDeltaTime, 0, vertical*Time.fixedDeltaTime);

I have a ridgidbody attached to my board, and attached the script to my longboard, But i didn’t really get what you are saying. Im trying my best to learn the language of unity :-)!
Do i need to add this script, with the car scripts from the tutorial?