I'm using forces. Yeah, the capsule approached occurred to me earlier, but it feels like a hack rather than a good approach. I'll implement that and hope it won't have any side effects, and that it will work for any other object that might be manifesting this behavior.marios wrote:how do you move your player? impulses or kinematic object? If impulses/forces I suggest you to add some force upward. Another way to workaround this is to change player collision object to sphere or capsule
Object stuck in the floor.
-
- Posts: 22
- Joined: Sun Jul 24, 2011 5:07 pm
Re: Object stuck in the floor.
-
- Posts: 17
- Joined: Tue Jul 26, 2011 9:24 pm
Re: Object stuck in the floor.
Generating environments with hundreds of small objects like your doing is a big no, no in any physics engine.
But most games have the character in a pillbox shape as it allows characters to not get stuck on tiny edges like a curb for example.
What you could do though is try making your ground fracturable. (see the new fracture demo) What this does is puts all the small boxes into one object if they are touching.
But most games have the character in a pillbox shape as it allows characters to not get stuck on tiny edges like a curb for example.
What you could do though is try making your ground fracturable. (see the new fracture demo) What this does is puts all the small boxes into one object if they are touching.
-
- Posts: 22
- Joined: Sun Jul 24, 2011 5:07 pm
Re: Object stuck in the floor.
For each block I have a class instance, holding information about that block, and the block's btRigidBody. If the fracturable merges touching rigid bodyes, then the pointer to my rigid body the block holds becomes invalid, am I correct?
And what if I have many blocks? They are not dynamic, so I do not see the issue. Except the one I am listing above.
Also, apparently the capsule doesn't have a round bottom, the bottom is triangular. My issue with this is the capsule lowers whenever the character walks from one block to another, it lowers right between blocks.
And what if I have many blocks? They are not dynamic, so I do not see the issue. Except the one I am listing above.
Also, apparently the capsule doesn't have a round bottom, the bottom is triangular. My issue with this is the capsule lowers whenever the character walks from one block to another, it lowers right between blocks.
-
- Posts: 17
- Joined: Tue Jul 26, 2011 9:24 pm
Re: Object stuck in the floor.
Yes you will likely lose your information on the block with the fracture method.
and yeah the capsule method will likely sink and rise with each block you pass. There isn't a physics engine that I know of that will provide a smooth transition from one block to another simply because of the way physics engines detect collisions. (yes, even havok won't do it last I tried it)
and yeah the capsule method will likely sink and rise with each block you pass. There isn't a physics engine that I know of that will provide a smooth transition from one block to another simply because of the way physics engines detect collisions. (yes, even havok won't do it last I tried it)
-
- Posts: 22
- Joined: Sun Jul 24, 2011 5:07 pm
Re: Object stuck in the floor.
This is bad. This is very bad. How am I supposed to make a game in which the character walks like he's on springs... I really need a workaround for this, there must be something, anything. Surely I'm not the only one facing this problem, I'm sure other people have made 2D games using bullet...
-
- Posts: 1
- Joined: Tue Apr 10, 2012 8:58 pm
Re: Object stuck in the floor.
Hi,EddieBytes wrote:Come on, really? Has no one else encountered this before?
I have started to learn Bullet last month and this is my view of your problem. If that red box in the screenshot around/inside the rigid body is an aabb box or another bbox the size of that is too small and since Bullet first callculates broadphase - no collision is detected although the rigid body's foot is already in collision.
Although I think my advice to you is already outdated
T.
-
- Posts: 149
- Joined: Fri Jun 24, 2011 8:53 am
Re: Object stuck in the floor.
Mako_energy02 wrote:As for your character, you are directly controlling a rigid body? I have no idea why it's not behaving with the margin you set. I was kinda hoping you were using a kinematic character controller, cause last I looked it's still quite buggy and there are a number of things that need tweaking, but a regular rigid body should "just work".
EddieBytes wrote:How would I go about fixing this behavior?
For community information, I have encountered this behavior(or, more likely a variant of this behaviour) myself.EddieBytes wrote:Come on, really? Has no one else encountered this before?
In issue1.png, it's sort-of-correctly resting on top of the lower box. I have experienced this myself and asked for some ideas. Top down, my case was like this. A ball, rolling on the boxes I drawn here, would occasionally hiccup on the "would-be internal edge" of two adjacent boxes. In the end, I could not make it work. I had to write again my own kinematic controller, this time done right. I hope.
Point is, simple shapes are not supposed to be adjacent. I wonder if there could be a way to provide some kind of "internal edge" information in those cases.
No matter what the collision margin is{1}, there is always a point in which their protection will fail and at this point, the object will be sort-of-correctly considered colliding. Which is the whole point.
If using dynamic modelling, changing the shape to a sphere or perhaps a capsule will - I speculate - cause the "hiccups" I mentioned above.
I am very interested in this.
{1} To be completely honest, I still have some difficulty understanding what margins are for: they always appear to work the same for me!