Objects Falling Through
+3
sio2interactive
meteors
samson
7 posters
Objects Falling Through
First, thank you very much for this wonderful engine and the helpful tutorials!
I keep having a problem with objects falling through my terrain, which is made up of a deformed plane. I would like to be able to have a small, flat object that can slide along the surface of the terrain, but once I get below a certain size the object falls through. Increasing the object's size solves the problem, but I need it to be very small relative to the terrain. I have tried every combination of physics settings that I can think of for both the terrain and the object, and nothing seems to prevent this from happening.
I keep having a problem with objects falling through my terrain, which is made up of a deformed plane. I would like to be able to have a small, flat object that can slide along the surface of the terrain, but once I get below a certain size the object falls through. Increasing the object's size solves the problem, but I need it to be very small relative to the terrain. I have tried every combination of physics settings that I can think of for both the terrain and the object, and nothing seems to prevent this from happening.
samson- Posts : 27
Join date : 2008-11-29
Re: Objects Falling Through
Also, I don't know if this means anything, but when I run the scene in the blender physics simulator the objects no longer fall through.
Thanks in advance!
Thanks in advance!
samson- Posts : 27
Join date : 2008-11-29
Re: Objects Falling Through
Are you familiar with "terrain clamping"?
If not, google it. If you get it working, please post your code in here.
Best,
-joshua
If not, google it. If you get it working, please post your code in here.
Best,
-joshua
meteors- Posts : 241
Join date : 2008-11-08
Location : Sunny Florida
Re: Objects Falling Through
I googled that and I'm not sure that's exactly what I'm looking for. I want to make a snowboarding type game, so my player would also have to be able to leave the terrain. What part of my code would you like to see? I'm using tutorial09, the only thing im changing is that I'm making the plane larger and deformed, and I'm making the player object much smaller.
samson- Posts : 27
Join date : 2008-11-29
Re: Objects Falling Through
If I extrude the plane to make it 3d then the problem is solved, so it just seems to happen when its a plane mesh. Thanks for the help by the way!
samson- Posts : 27
Join date : 2008-11-29
Re: Objects Falling Through
Its not because its a plane, if you have read the manual of Bullet you would see that they suggest you to NOT use extra small values... by putting a "depth" to you plane you are avoiding this problem...
I would suggest you to add the "margin" as a user property of your object in order to adjust to collision "depth" which is exactly what you should do... by doing the method above your are avoiding the problem (temporary) instead of fixing it...
I would suggest you to add the "margin" as a user property of your object in order to adjust to collision "depth" which is exactly what you should do... by doing the method above your are avoiding the problem (temporary) instead of fixing it...
Re: Objects Falling Through
Wonderful, I will try what you suggested. Thanks for your insights. Sio2, you are a god
samson- Posts : 27
Join date : 2008-11-29
Re: Objects Falling Through
What is the _btRigidBody attribute that should be set to avoid the issue and add a "depth" to the plane?
uprise78- Posts : 228
Join date : 2008-10-31
Re: Objects Falling Through
Setmargin, however you can add it as a user property in blender instead of setting it manually to the _btRigidBody variable after the physic properties have been set.
Re: Objects Falling Through
Great! That's even better. Thanks sio2.
What other custom properties are available in Blender or where in the code can I find this information?
What other custom properties are available in Blender or where in the code can I find this information?
uprise78- Posts : 228
Join date : 2008-10-31
Re: Objects Falling Through
Well its all written inside the "fileformat_specification.pdf" that is located in the /docs directory of the SDK.
Re: Objects Falling Through
Sio2interactive,
you said that setting the margin is temporary and not actually the fix. Forgive me if this is a silly question but I am having a hard time sometimes since I am only the artist that knows almost nothing about programming and the programmer knows very little about blender:-) How do we fix this problem? How does blender and the code work together to fix this? For example Our scene just consists of buildings made of planes. The ground is made of a plane and so on. I am knew to blender and my only prior experience with anything on the computer was autocaad. Did I model anything wrong? Was there a better way to model?
Thanks in advance. Our game is getting closer and closer by the day to getting finished. We are still a ways off but this is something we need to fix right about now.
Jonathan
you said that setting the margin is temporary and not actually the fix. Forgive me if this is a silly question but I am having a hard time sometimes since I am only the artist that knows almost nothing about programming and the programmer knows very little about blender:-) How do we fix this problem? How does blender and the code work together to fix this? For example Our scene just consists of buildings made of planes. The ground is made of a plane and so on. I am knew to blender and my only prior experience with anything on the computer was autocaad. Did I model anything wrong? Was there a better way to model?
Thanks in advance. Our game is getting closer and closer by the day to getting finished. We are still a ways off but this is something we need to fix right about now.
Jonathan
JonPru- Posts : 16
Join date : 2008-11-14
Re: Objects Falling Through
I saw that the collision margin is now a settable property in v 2.49 under advanced in the logic section. The exporter 1.40 doesn't grab this value, so it still needs to be set with a custom property.
Shamaskatu- Posts : 10
Join date : 2009-08-18
Re: Objects Falling Through
Actually, the collision margin settable in blender's advanced logic panel has been there long before 2.49. You have to set the collision margin as a custom property ('mr') for the SIO2 exporter to grab it as the non-custom one you set in blender CANNOT be grabbed / is not exposed through python...Shamaskatu wrote:I saw that the collision margin is now a settable property in v 2.49 under advanced in the logic section. The exporter 1.40 doesn't grab this value, so it still needs to be set with a custom property.
Francescu- Posts : 136
Join date : 2009-03-18
Similar topics
» physics objects (triangle mesh vs triangle mesh) falling through each other
» duplicating objects at runtime and changing textures on the duplicated objects
» Falling through the floor when debugging?
» Cube Falling through Plane
» falling though world on device
» duplicating objects at runtime and changing textures on the duplicated objects
» Falling through the floor when debugging?
» Cube Falling through Plane
» falling though world on device
Permissions in this forum:
You cannot reply to topics in this forum
|
|