BryceStevenWilley / JTTW

Bodhi: 2D Platformer for COMP 460
Other
3 stars 0 forks source link

Monkey always faces right #99

Closed runningcrane closed 7 years ago

runningcrane commented 7 years ago

With the recent push, monkey always faces right when he's done moving, even if he was moving left before stopping.

BryceStevenWilley commented 7 years ago

This is why I hate cocos: the mass of the character changes slightly, but ONLY when the character is going left. Results in some unbalanced momentums, and the game thinks the character is moving right. WTF.

Debug log below.

deltaVel: 280
Left momentum: 1960592.8125, impulse: 1960597.1875, deltaVel: 280, mass: 7002.1328125
deltaVel: -280
Left momentum: -4.6484375, impulse: -1960597.4609375, deltaVel: -280, mass: 7002.1337890625
rightMomentum: 0, leftMomentum -4.6484375
Setting to go right: oldVel.x: -279.99932861328125, currentRelVel.x: 0.00066386011894792318
deltaVel: 280
Left momentum: 1960592.5390625, impulse: 1960597.1875, deltaVel: 280, mass: 7002.1328125
deltaVel: -280
Left momentum: -4.921875, impulse: -1960597.4609375, deltaVel: -280, mass: 7002.1337890625
rightMomentum: 0, leftMomentum -4.921875
Setting to go right: oldVel.x: -279.99929809570312, currentRelVel.x: 0.00070291070733219385
BryceStevenWilley commented 7 years ago

Should have fixed, hackaly. Did I mention that I hate cocos?

runningcrane commented 7 years ago

Doesn't seem to be fixed. This right-ness stays true in all poses, such as climbing: screen shot 2017-04-13 at 11 14 21 am

runningcrane commented 7 years ago

EDIT: My bad. I didn't pull properly. Monkey faces left now! However, I'll still leave this open because there are moments when the game still thinks Monkey is going left or right. screen shot 2017-04-13 at 11 11 48 am In particular, after climbing any tree (so just a series of up clicks), Monkey will automatically start moving either left or right depending on which side of the tree he climbed up on. Pictured above is Monkey walking while I'm not touching the keyboard.

BryceStevenWilley commented 7 years ago

Can you give me more info? By moving do you mean the character actually moves, or that the animation is walking, but the character itself doesn't move?

runningcrane commented 7 years ago

The character actually moves, and the animation is walking.

I'll press up. This results in Monkey being near the top of the tree. Without me pressing anything else, Monkey begins walking right (if I'm climbing up the left side) or left (if I'm climbing up the right side), with an appropriate switch in animation too.

BryceStevenWilley commented 7 years ago

These descriptions aren't enough for me, TBH, and this back and forth isn't fast enough (just because of our different work schedules). I'll check this and all of the other issues tomorrow on your machine.

BryceStevenWilley commented 7 years ago

Closing as it's just an animation bug.