FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Objects Falling Through

+3
sio2interactive
meteors
samson
7 posters

Go down

Objects Falling Through Empty Objects Falling Through

Post  samson Sat Nov 29, 2008 4:26 am

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.

samson

Posts : 27
Join date : 2008-11-29

Back to top Go down

Objects Falling Through Empty Re: Objects Falling Through

Post  samson Sat Nov 29, 2008 4:30 am

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!

samson

Posts : 27
Join date : 2008-11-29

Back to top Go down

Objects Falling Through Empty Re: Objects Falling Through

Post  meteors Sat Nov 29, 2008 7:22 am

Are you familiar with "terrain clamping"?

If not, google it. If you get it working, please post your code in here.


Best,
-joshua
meteors
meteors

Posts : 241
Join date : 2008-11-08
Location : Sunny Florida

Back to top Go down

Objects Falling Through Empty Re: Objects Falling Through

Post  samson Sat Nov 29, 2008 3:30 pm

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

Back to top Go down

Objects Falling Through Empty Re: Objects Falling Through

Post  samson Sat Nov 29, 2008 10:19 pm

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

Back to top Go down

Objects Falling Through Empty Re: Objects Falling Through

Post  sio2interactive Sun Nov 30, 2008 12:30 am

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...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Objects Falling Through Empty Re: Objects Falling Through

Post  samson Sun Nov 30, 2008 2:07 am

Wonderful, I will try what you suggested. Thanks for your insights. Sio2, you are a god Smile

samson

Posts : 27
Join date : 2008-11-29

Back to top Go down

Objects Falling Through Empty Re: Objects Falling Through

Post  uprise78 Sun Dec 14, 2008 3:07 am

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

Back to top Go down

Objects Falling Through Empty Re: Objects Falling Through

Post  sio2interactive Sun Dec 14, 2008 3:45 am

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.
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Objects Falling Through Empty Re: Objects Falling Through

Post  uprise78 Sun Dec 14, 2008 1:13 pm

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?

uprise78

Posts : 228
Join date : 2008-10-31

Back to top Go down

Objects Falling Through Empty Re: Objects Falling Through

Post  sio2interactive Sun Dec 14, 2008 4:20 pm

Well its all written inside the "fileformat_specification.pdf" that is located in the /docs directory of the SDK.
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Objects Falling Through Empty Re: Objects Falling Through

Post  uprise78 Sun Dec 14, 2008 5:03 pm

Awesome. Thanks.

uprise78

Posts : 228
Join date : 2008-10-31

Back to top Go down

Objects Falling Through Empty Re: Objects Falling Through

Post  JonPru Tue Jan 06, 2009 12:12 pm

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

JonPru

Posts : 16
Join date : 2008-11-14

Back to top Go down

Objects Falling Through Empty Re: Objects Falling Through

Post  Shamaskatu Thu Sep 03, 2009 8:55 am

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

Back to top Go down

Objects Falling Through Empty Re: Objects Falling Through

Post  Francescu Thu Sep 03, 2009 10:28 am

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.
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...

Francescu

Posts : 136
Join date : 2009-03-18

Back to top Go down

Objects Falling Through Empty Re: Objects Falling Through

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum