Differences
This shows you the differences between two versions of the page.
Previous revision | |||
— | Setup:QuickStart [2024/01/22 08:50] (current) – nwhcoding | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Quick Start ====== | ||
+ | ==== Vehicle Model Requirements ==== | ||
+ | <wrap round important> | ||
+ | [{{ : | ||
+ | [{{ : | ||
+ | |||
+ | <wrap round important> | ||
+ | ==== Physics Settings ==== | ||
+ | * For PC games, it is recommended to change the '' | ||
+ | * All NWH assets use only SI units (kg, m, N, etc.). | ||
+ | |||
+ | <wrap round important> | ||
+ | ===== Automatic Setup ===== | ||
+ | |||
+ | ==== Vehicle Setup Wizard ==== | ||
+ | |||
+ | To set up a vehicle automatically, | ||
+ | [[Setup: | ||
+ | The '' | ||
+ | Depending on the settings, you might need to set up the input manually: [[Setup: | ||
+ | |||
+ | |||
+ | ===== Manual Setup ===== | ||
+ | |||
+ | ==== Rigidbody ==== | ||
+ | |||
+ | Add a '' | ||
+ | ==== Colliders ==== | ||
+ | |||
+ | Add a '' | ||
+ | ==== Variable Center of Mass ==== | ||
+ | |||
+ | Add the [[NWH: | ||
+ | For Unity 2023 and newer, you can adjust the center of mass and inertia tensor directly on the Rigidbody, so this script will not be needed. | ||
+ | |||
+ | |||
+ | ==== WheelController3D ==== | ||
+ | For a vehicle to function properly, it requires wheels. NWH Vehicle Physics uses the included asset // | ||
+ | |||
+ | * Attach the '' | ||
+ | [{{ : | ||
+ | |||
+ | * Add the '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * Turn on Gizmos and select the wheels. The wheel gizmo and suspension gizmo will appear. Adjust the '' | ||
+ | [{{ : | ||
+ | |||
+ | * Press play. The vehicle suspension is now functional. If the vehicle jitters, jumps, or exhibits other issues, check that the vehicle has a '' | ||
+ | |||
+ | ==== Input ==== | ||
+ | * Check [[Setup: | ||
+ | |||
+ | The guide above is recommended for understanding of how input works. Below are the ' | ||
+ | |||
+ | * If using **InputSystem** (new Unity input package) add the following components to any object in the scene, e.g. // | ||
+ | * Add [[NWH: | ||
+ | * Add [[NWH: | ||
+ | * If using **InputManager** (old/ | ||
+ | * Add [[NWH: | ||
+ | * Add [[NWH: | ||
+ | * **// | ||
+ | |||
+ | ==== Cameras ==== | ||
+ | * Create an empty '' | ||
+ | * Add a '' | ||
+ | * The [[NWH: | ||
+ | |||
+ | ==== VehicleController ==== | ||
+ | * Add '' | ||
+ | * '' | ||
+ | * Go to '' | ||
+ | * Press play. Vehicle will now function but will not respond to any user input. | ||
+ | |||
+ | ==== Assembly Definitions ==== | ||
+ | **This asset uses Assembly Definition (.asmdef) files.** There are many benefits to assembly definitions but a downside is that the whole project needs to use them or they should not be used at all. | ||
+ | * If the project already uses assembly definitions accessing a script that belongs to this asset can be done by adding an reference to the assembly definition of the script that needs to reference the asset. E.g. to access VehicleController adding a NWH.VehiclePhysics2.VehicleController reference to MyProject.asmdef is required. | ||
+ | * If the project does not use assembly definitions simply remove all the .asmdef files from the asset after import. | ||
+ | |||
+ | Using LogitechSDK (which does not fature assembly definitions) will therefore require an addition of .asmdef file inside the LogitechSDK directory and a reference inside NWH.VehiclePhysics2.VehicleController or removal of all .asmdef files from the asset if you do not wish to use assembly definitions. | ||
+ | |||
+ | |||
+ | ====== Video Tutorials ====== | ||
+ | |||
+ | These videos have been created by [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | Getting started with NWH Vehicle Physics 2 - Unity Asset Tutorial]] | ||
+ | |||
+ | [[https:// | ||
+ | Model to Driveable in Under 60 Seconds - NWH Vehicle Physics 2 for Unity]] |