Box2D velocityThreshold problem

From the bundled Box2D headers in the current Corona distribution:

#define b2_velocityThreshold 1.0f

So any velocity under 1.0 will be treated as nonelastic in a collision.

Problem is by pool(billiard) bumpers they have to bounce back at any velocity that is greater than 0.

As the velocity is not exposed as a property of the physics object, that affects any kind of physics scenario involving objects hitting walls at low velocities, including the Sample Pool from the Physics directory in the Corona distribution. The balls simply stick to the walls (nonelastic) instead of bouncing.

Same problem affects the game i’m creating (physics puzzle games with a billiard-like scenario). Is there a possibility to change the velocityThreshold on ourselves, or what is the course there?

I’m close to release, with 7 bugs on my checklist, and this one is the only that cannot be fixed no matter how much one tweaks the other physics parameters…

Thanks.
Alex [import]uid: 4572 topic_id: 7863 reply_id: 307863[/import]

+1. it’s not essentially a bug, it’s a missing feature. but it would be good to be able to access all the config elements of Box2D… this one especially

[import]uid: 10744 topic_id: 7863 reply_id: 29267[/import]

Well, it is a missing feature. But for me, is a showstopping bug, because i cannot release my game because of it :wink:

Filed a bug also, a week ago, still “Incoming, needs review”…

[import]uid: 4572 topic_id: 7863 reply_id: 29310[/import]

I needed objects to always bounce, and in playing with the settings, I found that by setting the bounce value of the objects to 1, everything always bounces, regardless of incoming velocity.

The docs say that “bounce” is the amount of velocity returned after the collision, so if everybody is 1, they bounce at all velocities.

I don’t know if that is going to be an acceptable solution in your case, but give it a shot. [import]uid: 5317 topic_id: 7863 reply_id: 29326[/import]

I already tried that…it does not always work, and it breaks the feeling of the game, since the objects will bounce far too much. Thank you however for the idea.

Let’s see what the engineers at Ansca come up with about this. [import]uid: 4572 topic_id: 7863 reply_id: 29344[/import]

Hello, Ansca and community!

Been a while since i launched this topic, commented on another topic (http://developer.anscamobile.com/forum/2010/11/10/expose-box2d-velocitythreshold-parameter-help-sticking-objects) and filed a bug in the Ansca Bugs System, on 14.03.2011 (http://bugs.anscamobile.com/default.asp?4148).

Now except for Carlos (thank you for the time you took, i know you have a lot to run/organize/check/do), nobody from Ansca was able to at least overview my ticket, and/or give at least a rough estimate on a fix / solution. I’m sure you have your reasons. I’m not judging the capabilities you guys have. For sure not. I’m just questioning the way you approach/communicate with the people using your platform, that really have a problem. It is clear that there are 1000 people asking all kind of questions all around…i understand that.

I also make a clear difference between bug posting/feature posting and showstopping bugs.

Since the Box2D library is already supported, i prototyped my game assuming that everything will work correctly.

Now i’m standing in front of a finished functional project, that cannot move into his final testing phase before release, because of this specific bug (it is a bug, since it affects the physics engine functionality).

I’m not asking for an immediate solution. I know you guys do your best to help everyone in here, and develop your product further.

All i’m asking for, is for someone to at least tell me if this is gonna be fixed sometime, and if possible, when.

Thank you in advance.
Alex.
[import]uid: 4572 topic_id: 7863 reply_id: 30960[/import]

Of course we are MIA!

We are buried in getting Android out the door next week and code freeze is in effect.

And I can’t address just about every forum entry so I posted a general forum about what is going on a few days ago on the What’s new to subscribers only section. A day before you posted your last entry;.

Que Pasa Carlos !
http://developer.anscamobile.com/forum/2011/03/31/que-pasa-carlos#new

you want a SetLinearVelocity() method added into our physics API? like we did with setVelocityIterations http://developer.anscamobile.com/reference/index/physicssetvelocityiterations

C. [import]uid: 24 topic_id: 7863 reply_id: 30962[/import]

Hello Carlos,

As i said before, i know you guys are doing a lot. I read the forums everyday.

That’s why i appreciate even more you took the time to answer. Thank you for that.

the method should be SetVelocityThreshold(float) or SetVelocityThreshold(int), minimal functionality would be to be able to set it to 0, case in which all collisions are elastic, best case would be to be able to pass a value between 0 and 1 float.

The parameter the method should affect is defined in the Box2D.framework/Headers/Common/B2Settings.h, and is defined as follows:

/// A velocity threshold for elastic collisions. Any collision with a relative linear
/// velocity below this threshold will be treated as inelastic.
#define b2_velocityThreshold 1.0f
Thank you very much once again.

Alex [import]uid: 4572 topic_id: 7863 reply_id: 30972[/import]

Hello Carlos, Ansca,

Any updates here?
Alex [import]uid: 4572 topic_id: 7863 reply_id: 34844[/import]

Hello Ansca,

3 months gone again. Last post from Carlos on 6th of May.

I know you make a lot of developers requests come true. This one seems to be the one that simply won’t come up.

Starting to wonder if you fully understand what the concept “Cannot launch my game due to one bug that makes objects stick to the walls at lower velocities” means.

It means that i created two games based on physics, and both stay in the dust, since it makes no sense to release them with such a bug. It breaks up the game’s logic.

Look at the start date on this thread. Look at the time i filed the bug 4148. Look at how many times i got the promise this will get solved.

No more comments from me. Just plain dissapointment.
Alex. [import]uid: 4572 topic_id: 7863 reply_id: 48966[/import]