Game engine physics problem.

2 cubes, one is supposed to be a “room” and the other is just supposed to be a “crate” in the room which is to fall down to the floor (realistically). I have made the “crate” a dynamic actor and have enabled “rigid body”, I have also enabled bounds to “box”.

The resulting is a “crate” that does fall down and hits the ground like a crate should, but just before setteling down it starts vibrating and sliding around the “room”

I have played around with the friction options for both the “room” and the “crate” materials, but I always end up with either the vibrating effect or just the “crate” sliding across the “room” as if the floor was covered with ice.

It might be some sort of a bug, but its more likely that I am just doing something wrong with the settings, or not doing something. If anyone knows what that something could be, i would be very greatefull if you told me.

Thank you.

I’d call it “some sort of bug”, the bullet physics engine in 2.40 will fix a lot of issues with these things…

if you mess with the form value [in game logic buttons] on the cube it will probably be made more tolerable until then

Sooo, you are telling me that the blender “game engine”, is not, and was never able to properly simulate the effects of physics on something such as a falling crate? What kind of games are you people making that it never required a box falling from somewhere?

I just find it hard to believe that no one ever came across this “bug” as you named it, before. I mean this is something that would hold back the game making process in an obvious way dont you think?

Its a little dissapointing.

box bounds is a relatively new feature [since 2.32 or so if I recall] and it never really worked right

essentially it was just “turned on”, the collision detection [SOLID] supports a bunch of primitives like boxes and cones and such, and it was mentioned around the 2.25 era that it should be easy to get other bound types [than sphere] working.

stacking has issues [much less noticable with sphere] and non-sphere bounds have a tendency to jitter… as I said, this will be fixed in the next version by bullet physics

I’ve made a similar scene very recently (I’m new to Blender Physics and was testing it). I found that if you don’t use the box bounds it will work just fine. You can change the size of the default spherical bounds if you still have trouble…

I have a working blender file of what (I think) you are trying to describe. If you would like to see it I would be happy to email it or put it up on my site’s ftp.

PiXEL8oR

Turn up the “form” value in the gamebuttons. It’ll help the vibrating.

Yes but doesn’t it also make the cube stop before it hits the ground?

Yes but doesn’t it also make the cube stop before it hits the ground?[/quote]no [you’re thinking of the damp value], when you turn up form the cube will rotate more slowly on the ground… so if you have the cube land on the edge of another so it would roll off, turning up form makes it roll off slower [and jitter less or none in that situation and when it should otherwise be resting]

2.40’s bullet physics also will bring the cube to sleep, it will at some point completely stop moving and no longer be a draw on your physics performace.

Oh ok cool…

What kind of games are you people making that it never required a box falling from somewhere?

The games were cleverly designed so that it won’t highlight on the weaker points of blender, but instead on the stronger points. People’s come up with extremely clever ways to achieve things that one may not have thought possible in the Blender GE. Just check out the games/tutorial list and you might be a bit surprised.

Hmm, I don’t think anyone has made a game that relied on the physics engine mostly. :wink: Most just crossed their fingers and hoped their character wouldn’t fall through the floor or go through a wall.

:smiley: But the coming of bullet will change all that.

Jason Lin

Your ftp link doesnt work.

Rotate the cube so that it will hit the ground with one of its corners first and you will see it just stick into the ground. Not what I want.

Having the box bound selected does what I want in the beggining, but instead of just setteling down in the end like a box would, it starts to vibrate around, and it slides across the floor. That is the problem I was talking about.

Thanks for your feedback though.

PS: I downloaded the 2.40 RC1 build and I have tryed the same scenario there with the same results, are the bullet physics implemented in this alpha build, becouse if they are they didnt solve anything. Can anyone explain this to me?

go into the world buttons and set the physics to bullet [from sumo]

The ultimate perfection of how it handeled the falling crate has made me cry.

Thanks alot z3r0 d.

I didn’t make it a link i just typed “ftp” and it automaticly did that, sorry.

It worked? Excellent, I should try that too…

hey,

is it possible to make an object “dynamic” and “nondymaic” in game with python?

i remember a command like…

obj.setDynamicObject()
obj.suspendDynamics()
obj.resumeDynamics()

… i never got them to work but if anyone else knew that it works in blender, you could make your box a dymaic object when it is hit by say a bullet, and when its absolute velocity is very small and a certain amount of time passes, the box will “freeze” into a non dynamic object

i guess another way of doing it is just using editobject add object/end object to insert a static box, and when it is hit insert a dynamic box

you can find an objects abs velocity with


vel = own.getLinearVelocity()
absvel = math.sqrt( math.pow(vel[0],2) + math.pow(vel[1],2) + math.pow(vel[2],2) )

if absvel > 0.1:
time = 0

if absvel < 0.1 AND time > 3:
“edit object replace dymaic box with static box”


you absolutely can, but why? that is one of the features the bullet physics engine has that sumo did not, there is no reason to implement it yourself

[suspend dynamics is like pause, if the object was moving when you resume it it will resume moving]

How reliable is 2.40 and the bullet physics?

?.. what? can you be more specific?

Well, I mean, its still being tested. I wondered if anyone was running into strong issues or if it would be feasible to start using it now for projects.

:wink: Yeah I had time to try it out a bit awhile back. Here’s some problems I encountered. I hope bullet is fully stable when it comes out in 2.40.

http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=171

Jason Lin