hasermichael.blogg.se

Wingnuts 2 bypass game code
Wingnuts 2 bypass game code













wingnuts 2 bypass game code

But a THEORY we have is: Jitter affects friction.ĪND. We just want to keep the player box atop the platform. Hey notice that we (Hans and I) are not concerned about seeing the jitter, and we are not concerned about reducing CPU load. Who would have expected world.allowSleep to be false by default? hmm. YAY! Perhaps we can learn about auto-sleep, now that it is activated and apparently working. And, I'm not seeing any indication of jitter-off. That demo now shows a quick-change to player.sleepState = 2. I think that is the solve we were looking-for. Thx for the reminder about world.allowSleep. But we were also working on an issue about scaling physics mesh-shapes, too. We just kept experimenting and trying things. We're glad you visited, Fenomas! Sorry for the long thread. Not many forum helpers wanted to come to this campfire. for about what? 3 weeks now, Hans? A month?

wingnuts 2 bypass game code

and we have both done some begging for help. Then again, you didn't back-read the thread, so you didn't know what was already tried. Hans has done lots of "parameter-tuning", already. after about 4.5 minutes (on my desktop machine). The green box falls-off-of the red platform. In other words, auto-sleep isn't a good way to fix jitter because bodies should only be falling asleep when their jitter is too tiny to see.ĭid you test it, This is your "working" demo, with both renderLoop anims disabled. The "sleep" feature in physics engines isn't supposed to perceptibly affect the simulation - it's supposed to skip bodies whose movement is imperceptibly small. It's certainly possible to avoid noticeable jitter!Īs for auto-sleep, you should think of it as a CPU-saving feature, not a way to avoid jitter. The only difference between a stable scene and an unstable scene is whether the jitter is noticeable or not. When I say it's impossible to eliminate jitter, I just mean that (discrete, integrated) physics engines are inherently inexact, so there's always some jitter going on (if the objects are awake). if they are not used to stop forever-jitter? I'm confused. Perhaps Hans and I are on a wild goose what IS sleepSpeedLimit, allowSleep, sleepTimeLimit, sleepState supposed to be used-for, then? When is the auto-sleep system SUPPOSED to be used? For what? Why do these parameters exist. Yes, multiple issues have been addressed, here, but still. I highly suggest we try to treat him kindly, in return. Kind, extremely patient, entertaining, willing to experiment and invent, reports all discoveries, just a great guy. Hans has been a delight to work-with, too. (these are some thngs we could use answers-to, everyone). I think Hans saw sleepState = true IF he reduced gravity to zero.) Or maybe, sleepState NEVER had ANYTHING to do with jitter? Maybe it's not intended for that. when gravity is a constant force? Do you know? (This was talked-about in previous areas of thread. I estimate about 5 minutes until the green box jitters-off the platform.įenomas, can you (kindly) clarify? Auto-sleep cannot work. (thx for clarification)īy the way, I turned-off all the before-render animation in your demo: Īlthough I didn't watch it. Hope this what IS sleepSpeedLimit, allowSleep, sleepTimeLimit, sleepState supposed to be used-for, then? When is the auto-sleep system SUPPOSED to be used? For what? Why do these parameters exist. This lets the player move around easily, but still come to a stop when not moving. I also added a little hack that I use in my game - I lower the player's friction when a movement key is pressed, and raise it again otherwise.

#WINGNUTS 2 BYPASS GAME CODE CODE#

I cleaned up the movement code so that the player moves while keys are pressed, rather than on each key event, and add jump (on space) This avoids any need to detect collisions and so forth. In my link the platform behavior is handled by simply putting the player on the platform, and allowing friction to keep him in place. In Cannon I believe the correct way to do this is by setting angularDamping to 1, as in my link. In a game like this you want to fix the player's and platform's rotation - so that when you apply a sideways force they translate around, rather than rolling. So I hacked up your previous demo into a simple version of what I'd think of as the "right" way to do a physics-based moving platform: I can help with physics but it's hard to scan this long thread and see what still need solving.















Wingnuts 2 bypass game code