Increasing the mass to push objects with the car

In this recipe, we explore some of the possibilities of manipulating the Massbox that we created when first creating the car's XML. With increasing the Massbox of the car, we will see how the car is able to push lighter objects out of the way.

Getting ready

Complete the Creating a new car XML recipe. Then open MyVehicle.xml in Notepad or an equivalent editor.

How to do it...

As simple as the previous recipe was, this one will be just as easy to make a massive change to your vehicle.

Begin by finding the car's part named massBox. To increase the mass of the MassBox, simply increase the mass = 1500 to a higher value such as 3500.

Note

The mass in CryENGINE 3 is measured in kilograms.

How it works...

A simple method to see the results of how easy it is for the car to move objects out of its way is to place down a basic entity with a mass of 1000 and then drive into it with the previous MassBox properties. Then repeat the process again with the 3500 MassBox value.

Tip

After changing any XML values on the car, you can reload the XML on the car by right-clicking on the vehicle and selecting Reload Scripts.

The MassBox is a special part of the vehicle that handles all of the physical interactions of the vehicle as a whole. Along with Arcade Wheeled as the movement behavior, the Massbox is the main point of reference for the car and all its parts for mass physics calculations (as long as all those parts remain on the vehicle).

Note

Be aware that increasing the mass of the MassBox will also change the driving characteristics of the car.

There's more...

It is possible to define the mass of other parts besides the Massbox. However, with Arcade Wheeled movement parameters, this property change will do virtually nothing, but with other movement behaviors it may change the driving mechanics such as the Wheeled Legacy (which should not be used as that movement behavior is no longer supported).

Still, there is a use of this property and that is if ever we want to create a part to be detached from the vehicle, this part requires a mass in order to follow the laws of physics for the CryENGINE, such as gravity.

See also

  • Creating a new car XML
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.216.175