racing-game
racing-game copied to clipboard
Add cheat codes
Cheat Codes
SOBIG: scales the vehicle by a factor of 3
SONORMAL: scales the vehicle by a factor of 1
SOTINY: scales the vehicle by a factor of 0.25
LOWGRAVITY: changes the gravity on the y-axis with the value -5
NORMALGRAVITY: changes the gravity on the y-axis with the value -10
Issues
- I tried applying the scale on the whole group in the
Vehiclecomponent but the physics wasn't working correctly - I am not sure what is the appropriate way to position the
Wheelaccording to the new vehicle scale - Updating the gravity dynamically doesn't work (pending on: https://github.com/pmndrs/use-cannon/issues/126)
It would be great if someone could give me some pointers on how to solve these issues 😁
you cant scale vehicle, the scales must go into the physics objects, not the outward geometric representation, which is controlled by cannon.
So I'll need to pass something to useRaycastVehicle?
Is there a section in connon-es or use-cannon docs where it can help me figure this out?