Hi, i’m creating a scooter game, so i see there are a lot of bike question.
For my game i created a little engine for my personal testing and i want give it to you.
Remember that is a test engine, so isn’t commented and can be a little confusing, but can help someone.
NOTE: I get a axix wrong for my model, so i had to change some rotation angles etc, and it need some fixes but is a start.
The game uses the wheel collider and rigidbody for the basic physiscs, then i used freezeRotation and changed the rotation myself, for move it uses transform.Translate().
The game is compete of Wheelie ( Left Shift Key ), Hit with ragdoll, respawn…
ALL MODELS ARE MADE BY ME (GILERA SCOOTER MODEL, HUMAN, HUMAN ANIMATIONS)
If you’re moving a rigidbody around with transform.Translate, you’re doing it wrong. Use rigidbody.MovePosition. This will cause the rigidbody to correctly interact with the environment.
I am working on same kind of game, I am playing with real physic and applying torque to rear wheel, after a a specific speed my bike is roteing on x axis and become up from back side as just reverse of your snap