mspraggs / potentia

Southampton Game Jam 2015
0 stars 0 forks source link

Physics goes mental on respawn after death... #103

Closed mspraggs closed 8 years ago

mspraggs commented 8 years ago

Yeah, so if you spawn for the second time at the start of some level, some really weird shit happens...

screenshot from 2015-11-22 00 13 28

First, when you spawn you can't move, and you're floating halfway up the opening at the edge of the level. Second, when you fire a weapon with recoil, you and your gun both gain a velocity, but the velocities don't have the same direction, so you drift away from your weapon.

Either of you change any of the physics recently?

DivFord commented 8 years ago

I haven't touched the physics.

I'm unable to reproduce this though. Does it happen for you consistently?

Fyll commented 8 years ago

This happened to me once, just before pushing the new collision system, but then I changed some code and it stopped happening, so I thought I'd cleaned it up. It must have just been some good/bad luck.

When you died, were you trapped inside something? The Player refresh doesn't zero staticness_, so that's what causes that (I think). I've pushed a fixed version.

As for the different velocities, I imagine that stems from the fact that staticness_ pretends to change the hitbox's mass, whereas the gun recoil skips past this (I think). Therefore, when you're static, the gun gives wierd recoil.

Try the new version, and see if you can get it to happen again.

mspraggs commented 8 years ago

@DivFord Yes it's pretty consistent. Maybe try cloning a fresh copy of the repo, building it from scratch and then seeing if it happens to you? EDIT: This is obviously pointless now, given I don't have the problem anymore.

@Fyll Ah yes, there were a few commits I was missing. All is working now with the latest version. I'll close this.