ScriptaGames / zorbio

A 3D multiplayer WebGL game
MIT License
8 stars 1 forks source link

Sometimes sphere doesn't rotate with camera #436

Closed Jared-Sprague closed 7 years ago

Jared-Sprague commented 7 years ago

So you see the sphere transparency bug that we saw when we made the spheres face the camera. Seems to only happen randomly.

Jared-Sprague commented 7 years ago

This was because of the setTimeout() on death to finish the particle explosion. At the end of the timeout the player is removed from the model and their controller deleted. The problem happened when the player clicks respawn really fast before the setTimeout fires. Then they're view get's screwed up when the remove code is called and they are already playing again.

Solution, move the dead players to their own object to finish thier animations then remove them separately.

Jared-Sprague commented 7 years ago

I think this is probably what was causing #268 as well