Jump to content

Vehicle Help Info - Author: Greg Hjelstrom


Guest Mauler

Recommended Posts

Guest Mauler

Overview

-         Make sure you read the “How To Construct A Renegade Vehicle” document.

-         Vehicle behavior is defined by the model for the vehicle and properties assigned to the vehicle in the Renegade level editor

-         Your 3D model controls things like the number of wheels, which wheels steer and which wheels output torque.

-         The level editor is used to define things like how fast your vehicle drives, how much health it has, and how stiff its suspension is.

-          For this presentation I’ll take a model of a Ford Explorer that I downloaded off the internet and set it up as a Renegade vehicle.

-         Once you’ve modeled your vehicle (or downloaded off the internet like I did), you can start to prepare it for actual use in Renegade.

-         An easy way to get the necessary bones is to merge them into your model from the “VehicleSkel.Max” file. 

Setting up the wheels

-         Renegade will create physics wheels for your vehicle by searching for transform nodes (or bones as some people call them) which certain names.

-         The contact point of each wheel is defined by a bone whose name begins with “WheelP”

-         The center of rotation for each wheel is defined by a bone whose name begins with WheelC”

-         Refer to the “How To” doc for a full explanation of these bones and the available parameters.

-         Wheel meshes that are attached to the WheelC bones will rotation and move to follow the terrain in the game.

-         Once you have all of your wheels set up, you make sure that in the top viewport, the vehicle is centered about the origin and the front of the vehicle is facing down the X axis.  If your vehicle has more than 4 wheels, then you should position it so that the centroid of the wheel positions is at the origin.  (Yeah yeah, we really should to write a little maxscript to do this for you)

Setting up the vehicle for collision

-         In all renegade models, the user has control over which meshes are used for various kinds of collision detection.  This is done by using the W3D Tools utility in 3dsmax to set the collision options for each of your meshes.

-         For physical movement, all Renegade vehicles are a single box.  This box is called the “WorldBox” and must be present in your vehicle for it to function properly.

-         When the vehicle moves in the world and when other vehicles and characters move into the vehicle, this box is used to resolve the collision.

-         For bullets and other effects, the actual meshes in the vehicle may be used for collision. 

Turret

-         Vehicles may have a single turret which is defined by a set of bones.

-         The “Turret” bone will be rotated about its Z axis as the user moves his targeting cursor left and right.

-         The “Barrel” bone will be rotated up and down as the user moves his targeting cursor up and down.

-         One or more muzzle bones will be used as the actual creation point for the vehicle weapon’s projectile.

-         See the “How To” doc for an explanation of these bones 

Exporting your vehicle

-         Your vehicle should be exported with its wheels in their extreme highest position.

-         In this position, all of the contact points for your wheels (the WheelP bones) must be inside of your vehicle’s world-box.

-         An easy way to do this is to simply move the Max timeline to frame 1, click the animate button, and move all of your WheelP bones up until they are contained inside the world-box.

 Setting the vehicle up in the Editor

-         In the editor you need to create and name a new vehicle object. 

-         Depending on what kind of vehicle you are creating, you should select WheeledVehicle, TrackedVehicle, or VTOLVehicle for your physics model type. 

-         An easy way to get a head start on setting all of the parameters is to create your vehicle as a derivation of one of our vehicles.  Simply select and existing vehicle before you hit the button to create your new one.

-         Next you need to set up the physics parameters, the game parameters, and the entry and exit transitions for the vehicle.

-         One pitfall to watch out for is that many of our vehicles have scripts which remove their enter transitions.  Make sure you check the “Scripts” tab on your vehicle’s property page and delete any scripts that may be attached to it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.