The IK controlled avatar is modular, meaning it works with any vehicle controller that uses the horizontal and vertical axes after a few small changes to the inspector and avatar prefab. In this example I’ll use the IK Driver Avatar Rig with a vehicle prefab from NWH Vehicle Physics. To begin, start in a fresh project and import NWH Vehicle Physics and IK Driver from the asset store.

  1. Open the Island scene included with NWH Vehicle Physics.

  1. Find the Sports Car vehicle prefab in the scene.

  1. Find the IK Diver Avatar Rig prefab and add it as a child of the Sports Car prefab, adjust the transform position and scale so the driver is in the seat and scaled appropriately.

  1. Expand the IK Driver Avatar Rig prefab object in the hierarchy to find the child named IK Driver Avatar, then assign the Configurable Joint component’s Connected Body field, use the parent Sports Car.

  1. Expand the IK Driver Avatar object to find the child named Race Driver, the IKD_IKDriver script has all the avatar configuration properties. Assign the Gear Text component reference (NWH’s gear text is called ‘Readout’, a child object of GearGaugeDigital on the vehicle’s world space dashboard canvas) so the system can use it to check when the text changes, when it does, it will trigger the driver shift animation.

  1. Disable the Steering Wheel Control to allow the NWH Vehicle Controller to control the steering wheel.

  1. Move the IK Steering Wheel object to be a child of the Sports Car’s Steering Wheel object that’s controlled by the NWH Vehicle Controller, adjust the transform’s position, rotation and scale so they align with the NWH steering wheel. Note: The child IK Target objects of the steering wheel are the target’s the avatar’s hand will reach for while steering.

  1. Disable or delete the steering wheel mesh that is included on the IK Steering Wheel.

  1. The avatar’s helmet is set to the Ignore Raycast Layer, you can set the Vehicle Camera Driver’s Culling Mask to not draw the Ignore Raycast Layer. If the driver’s arms are being clipped you can lower the camera’s Near Clipping Planes value.

  1. Create a new prefab or apply the changes to the Sport’s Car prefab vehicle object – setup is now complete.


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