racing-game icon indicating copy to clipboard operation
racing-game copied to clipboard

Add cheat codes

Open hazem3500 opened this issue 4 years ago • 2 comments

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 Vehicle component but the physics wasn't working correctly
  • I am not sure what is the appropriate way to position the Wheel according 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 😁

hazem3500 avatar Jun 06 '21 16:06 hazem3500

you cant scale vehicle, the scales must go into the physics objects, not the outward geometric representation, which is controlled by cannon.

drcmda avatar Jun 06 '21 16:06 drcmda

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?

hazem3500 avatar Jun 06 '21 16:06 hazem3500