-
Notifications
You must be signed in to change notification settings - Fork 18
Create New Vehicle
Category: Vehicle
Attaches a vehicle constraint to an object. This object will become the collider for the vehicle.
Careful: This node needs a specific object setup to work correctly. A vehicle needs to be ceated only once, otherwise the vehicle control nodes won't be able to address the correct constraint.
Of course, there must be the collider object. This will be the object executing the tree.
Parented directly to this collider must be all the wheels.
The wheels must follow a naming convention:
- If
FWheel
appears somewhere in the wheels name, it will be a front mounted wheel. - If
RWheel
appears somewhere in the wheels name, it will be a rear mounted wheel.
Don't worry, the wheels will be mounted in the position they are placed at, but the difference is that vehicle control nodes can be targeted to either front, rear or all wheels, which are accessed differently.
The collider may have any number of wheels. It may also have other children, as everything that doesn't have FWheel
or RWheel
in its name will be ignored.
The node will return a vehicle constraint which can be used to drive the vehicle or modify its attributes. This constraint will also be automatically saved to the collider object and can be accessed via:
# obj is the collider object
vehicle_constraint = obj['_vconst']
Condition
- The condition for this node.
Car
- The collider object.
Suspension
- The height of the suspension.
Stiffness
- This value will determine how much the vehicle will "wiggle" when receiving force.
Damping
- The rate at which suspension activity will subside.
Friction
- The grip of the wheel. Pavement would be a higher value than mud.
Done
True
if the node performed successfully.
Vehicle Constraint
- The vehicle constraint.
Documentation for Logic Nodes version 0.9.1 on UPBGE 0.3.0 Alpha