I’m making an adventure game with a lot of split decisions. The problem is that at random when I release the keyboard button my character doesn’t stop last input. I’m using character physics, and a w,s,a,d set up.
I’m sure you’ll agree that your post doesn’t really tell anyone much about how you set up your controls.
Make it easier for other people to help you or why should they bother. ADD A LINK TO YOUR BLEND FILE so they can look at what you’ve done
I have the same problem in my game but I’ve put it in the FIXME list for now so I can’t really tell you more than “I’m with you in spirit”.
What happens is that when the game loop gets too busy, either for logic, physics or rendering stuff, updates to the keyboard event states run for the hills. It happens both with sensors and “raw” handling of the keyboard.event map. We’re not the only ones noticing this but because the problem arises when the game becomes unplayable for other reasons (as I said basically too much stuff going on) it goes unnoticed.
Hello
add a “Material” to both objects and “play” with the “friction” settings, maybe?
Bye
I have never added alink before could you tell me how
I’m not 100% sure of what the issue you are bringing up is, but I have one thing to say.
A previous version of Blender caused my cursor (Object controlled by wasd) to continue in a direction after the key had been released sometimes. What was happening was the negative keystroke was being missed (The event fired when key is released). When I downloaded the newest version of blender (2.69) the bug disappeared, so try that.
fox1064: Your update to the first post says that you added a link, but I can’t see one, just so you know.
Actually, Kiva, fox1064 said
I have never added alink before could you tell me how
To answer that question, You actually use the Image adding icon, 4 icons from the right-most. It looks like a picture of a tree. you need to use that to add the link.
i guess use Loop End in the logic bricks (actuator if im not mistaken)
not sure. but give it a try
To give some more info till I can set a link tonight. My character is using location for movement and the jump button for jump. I have noticed sometimes when I even jump he continues to jump after I release the jump. And the jump has several properties on it to limit only a single jump. So it’s any movement button randomly sticks.
I hope this uploads I had problems trying. this is a file where I was testing my movement, again w,s,a,d movement and spacebar jumps.
Attachments
sonic_test.zip (1.01 MB)
I’m checking out the issue in my game right now and what I found - with a lot of print(“what the heck”) lines - is that press events are, under uncertain conditions, fired twice.
Like, the normal condition is:
press a key -> key pressed event
release a key -> key released event
what happens sometimes is:
press a key -> key pressed
release the key -> key released
I do nothing but… -> key pressed on the same key
Which is weird but happens
I checked your file. The good news is that your issue is different than mine, even if the symptoms look the same. There is something wrong with your logic that makes the player go on while he shouldn’t but I wouldn’t go nowhere near trying to debug that beautifully complex but also visually painful criss cross of lines.
I say that because the issue I have is spurious wakeups of keyboard states in the bge.logic.keyboard.event map, only after a rasterizer spike.
Ok I went back and deleted all the logic bricks on everything. I then just put w, forward s, backward a, rotate left d, rotate right. and to even my disbelief it still happened. I’m really lost. I also deleted all the properties.
Solved it! I finally gave in and redownloaded blender it worked thanks for your help