Skip to content

vehicleController.wheelRotation(i) only updated when steering #925

@tomo0613

Description

@tomo0613

when calling vehicleController.wheelRotation(i) on a RAPIER.DynamicRayCastVehicleController it will return 0 until steering is applied, even if it is moving.

when pressing forward the wheels will NOT rotate.
when pressing forward AND when turning to the right (pressing right) the front wheels will start rotate (in the correct direction), when turning left the wheels will rotate the OPPOSITE direction.

https://codepen.io/editor/Tomo0613/pen/019cd3e3-fe8b-738c-9211-e2529094714a
I added logging to the official ThreeJs demo (https://threejs.org/examples/?q=rapie#physics_rapier_vehicle_controller)
and reduced the wheel cylinder geometry's segment count to make it more visible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions