Open nearnshaw opened 3 years ago
Maybe we can add a no-gravity toggle that only works in preview mode? That wouldn't be a bit more useful adding a few more use cases like geometry placement, testing logic that is unrelated to gravity, etc.?
yes, that would also solve this issue + be useful for other things, cool!
When reloading a scene with hotreload, if I'm standing on a second floor of a building, the models don't have colliders for a second and I'll fall down through the floor.
If I'm doing adjustments to something that's upstairs, walking upstairs every time can be super time consuming and a bad dev experience.
A coupe of example scenes where this happens: https://github.com/decentraland-scenes/rotating-platforms https://github.com/decentraland-scenes/portal-puzzle https://github.com/decentraland-scenes/dcl-escape-room-tutorial
In any of these: go upstairs or jump on a platform, then change the code in any way for the hotreload to kick in You will fall through the floor
Possible solution: momentarily disable gravity for a second while hot reloading? Not sure if we can tell when everything finished loading, maybe there is no event for that, but if so, maybe a pause of a fixed duration is at least good enough to fix most cases.