Weird bug:

I have a trigger zone that causes damage to the player when they touch it. Everything works perfectly, except that I get one frame of damaging collision when I load a particular level. This only happens when I load this level from a previous level, not when I run it directly.

Here's what's really weird: when I look at the stack trace, the zone has transform pos: (-0.100000001, 0, -0.5) rot: eulerAngles: (-0, 0, 0) scale: (10, 1, 10), while the colliding player has transform pos: (20, 0.560276091, -20) rot: eulerAngles: (-0, 0, 0) scale: (1, 1, 1). How are these two colliding?

The resolution: Unity physics are unreliable on FixedUpdate 0. Now I just don't activate the colliders until the second frame and that seems to fix the problem.

Follow

@peterdrake Yeah, I think that's because it includes all the loading time as the first frame's delta time and that borks a lot of subsystems.

Having an asynchronous loading screen also solves it pretty gracefully.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.