A drag-and-drop procedural, input-based, animator-controlled humanoid IK (Inverse Kinematics) avatar prefab; there are no animation clips and you can replace the avatar with any other humanoid avatar model. This avatar is modular and works with other car controllers; integration guides are available for Realistic Car Controller and NWH Vehicle Physics.

Prefab Location:

Assets\TurnTheGameOn\Arcade Racer\Prefabs\AvatarDriver

Prefabs:

Prefab Description
AvatarDriver Default Ik avatar driver prefab.
AvatarDriver_RCC For use with Realistic Car Controller car prefabs.

Key Features:
• All IK targets can be re-positioned and rotated to fit any vehicle or avatar model.
• Driver can be on left or right side of vehicle (prefabs for both configurations are included).
• Configurable head look range, speed and snap back speed.
• Torso lean simulates gravity forces while turning.
• Steering wheel shake.
• Procedural IK animations based on input: look-to-steer-direction, steer, shift, apply brake pedal, apply gas pedal, apply clutch pedal.

Inspector Overview

The Race Driver object contains the AvatarDriver script that’s responsible for controlling the avatar; this script inspector primarily contains direct references from the scene, an AvatarDriverSettings ScriptableObject contains all of the adjustable settings.

Avatar Driver Settings

A ScriptableObject used as a profile for avatar drivers.

ScriptableObject Location

Assets\TurnTheGameOn\Arcade Racer\Data\AvatarSettings

Inspector Overview

Avatar

Variable Description
IK Active Toggle IK control on or off
Avatar Position Controls the avatar’s root transform local position
Shift Hand Set to left, right or none
Clutch Foot Set to left, right or none
Brake Foot Set to left, right or none
Gas Foot Set to left, right or none
Default Lean In Controls avatar’s transform.x local rotation to position the torso to lean closer or farther from the steering wheel
Torso Curve Helps smooth out and control torso lean and rotate left/right which is based on input
Rotate Range Controls Max Rotate Left and Right
Max Rotate Left Clamps the avatar’s transform left local rotation.y limit
Max Rotate Right Clamps the avatar’s transform right local rotation.y limit
Lean Range Controls Max Lean Left and Right
Max Lean Left Clamps the avatar’s transform left local rotation.z limit
Max Lean Right Clamps the avatar’s transform right local rotation.z limit

Head

Variable Description
Look Range Controls Max Look Left and Right
Max Look Left Clamps the look left distance for the avatar’s look target transform local position.x offset
Max Look Right Clamps the look right distance for the avatar’s look target transform local position.x offset
Default Look X Position Default look target position when the steering input is 0
Look Speed Controls the look while steering and while not steering speeds
Steer Look Speed Controls the look speed while steering
Snap Back Speed Controls the look speed while not steering

Input

Variable Description
Avatar Input Type Player, AI, or RCC
AI Steer Multiplier Controls the steering wheel rotation speed when Avatar Input Type is set to AI
Steering Axis Set the name of the steering axis used to control the avatar
Throttle Axis Set the name of the throttle axis used to control the avatar

Shifting

Variable Description
Enable Shifting Toggle avatar shifting on or off
Shift Trigger the avatar to play a shift animation
Shift anim Speed Controls the speed of the shift animation

Steering

Variable Description
Steering Targets Two targets will keep the hands clamped, All targets will allow the hands to use all steering targets to move dynamically
Control Steering Wheel Toggle control of the steering wheel
Steering Wheel Rotation Sets the amount the steering wheel can rotate in a direction from the default position
Wheel Shake Allows the steering wheel to shake left and right based on vehicle speed
Steering Wheel Rotation Sets the steering wheel’s transform local rotation
Steering Wheel A reference to the steering wheel parent transform used to rotate the steering wheel
Steering Rotation Speed Controls the speed the steering wheel turns

IK Timing Control

Variable Description
Speed Type MPH or KPH, sets the multiplier for calculating current speed used for steering wheel shake
Rotation Speed Controls the steering wheel rotation speed while steering axis input is not 0
Snap Back Rotation Speed Controls the steering wheel rotation speed while steering axis input is 0
Hold Shift Time The amount of time the avatar’s hand will stay on the shift knob before returning to the steering wheel
Shift Back Time The amount of time it takes for the avatar’s hand to return to the steering wheel after shifting
IK Speed The lerp speed used for positioning the avatar’s hands
Max Rotate Speeds Sets a limit on the rotation speed of the avatar torso

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Please do not use this for support questions.
For customer support, please contact us here.

Post Comment