Problem with Flappy bird clone

I’m trying to do flappy bird clone (Flappy Pea :wink:) and I found out that when I hold mouse button, pea is going up constantly:

I’ve tried to use Impulse, but even with as low impulse as 1 bird is skyrocketing.

You can think of units of the physics engine as meters per seconds.
Most of the time you should use impulse (for actions that are only applied one time in a row) or force (for actions that are applied continuously) with a low value. Try an impulse of 0.1, it should be ok here I think. :slight_smile:

Event is now same as previous, except I’ve added impulse of 0.2 (0.1 was too small). However when I press down LMB, it still goes up indefinitely. Either Trigger Once is bugged or I am doing something wrong, or physics are bugged.

It happens with both native and html5 platform.

So you just removed the action to add a force and add an impulse instead?
Send me your project file if you want.

If you believe it’s a bug, try to use the alternative function to add an impulse (the one using coordinates instead of angle). If it works the other function is bugged.

Sent via PM, I’ll try to use coordinates version later.

There aren’t any bugs: When you keep pressing the mouse button, the conditions are true (if the timer value is high enough) so the actions are executed and then the timer is set to 0. So after, the conditions are not fulfilled anymore, until the timer reach 0.1 seconds again.

You should rework your conditions: trigger once apply to the whole conditions (and it is useless here because of the use of the timer which already add to the event a behavior similar to the trigger once). Maybe you can use subevents to separate the check for a single mouse button click (with trigger once and the left mouse button condition) and the rest of the conditions that are dealing with the timer.

In any case, everything is working correctly in the conditions and actions :slight_smile:

I’ll try, thanks! If I don’t edit this with “it works”, assume it didn’t.

//edit: It works!

Good :slight_smile:

4ian, since you have project files, can you help me on an unrelated issue? I want my bird to go up/down (as in rotation), but despite physics automatism not having “fixed rotation” checked, forces do not push it around. I need somewhat throw it off balance like changing center of mass or something. Can you help me?