Skip to content

Please help to transform Car script to XZ plane #9

@kenneth-huynh

Description

@kenneth-huynh

Hi jongallant,

Thank you so much for sharing your code! I am very appreciative of your work.

I have been trying for the last few days to transform your car script to work on the XZ plane using Rigidbody instead of Rigidbody2D. The World to Local space vector transformation is doing my head in, and still I can't get it to work correclty. I have tried almost everything from renaming .y ->.x, to using LocalVelocity = transform.InverseTransformDirection(Velocity) and Acceleration = transform.TransformDirection(LocalAcceleration);... My car moves sideways?!? I have tried using Local and World rotation on the LocalAcceleration and still it is behaving very strangely....

Can you please help?

Many thanks.
Ken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions