Jump to content

Child object physic bug


YouGroove
 Share

Recommended Posts

In the scene i have one empty model composed of two child physic objects, than i put a mass to 1 for each child objects.

 

Launching the game, the two objects just fly away instead of simply falling on ground.

 

collision.jpg

 

 

How to test :

- Dezip file

- put map file in your "map" file directory

- put columnTest.zip in your "models" directory and dezip it here

- run the game

bug.zip

Stop toying and make games

Link to comment
Share on other sites

Okay, so those two visible children have mass, but they don't have a collision shape, so they just sink right through the floor.

 

When I set the parent's mass to non-zero and set the children's mass to zero, it works fine.

col2.rar

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

In fact i thaught we could have a mass = 1 for each child , but when i do that each childs fly aways in any direction, i expected we could the two childs to fall on floor independently because each have a mass and a collision (even by at each child a simple collision box in LE3 ).

Some application could have been columns or walls braking in many parts, it would be a prefab made of multiple childs, during game you would reaplace a column by some instance prefab of a column broken in multiple childs.

 

Edit :

To clarify : In your example map, it falls on floor but as one object only because a mass is given to the parent object, not as two individual physic pieces

  • Upvote 1

Stop toying and make games

Link to comment
Share on other sites

When I ran it they just fall into and through the floor. They don't fly away from each other.

 

Normally when you do breakage type stuff, you swap out the unbroken model for some fragments.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Normally when you do breakage type stuff, you swap out the unbroken model for some fragments.

I tried , the only way to have physics working well was a very approximative way using script :

http://www.leadwerks.com/werkspace/page/tutorials/_/artwork/destroyable-physics-r112

 

Take a wall for example, when remplacing it by the broken wall composed of ten pieces, we would need to be able to import some FBX file containing all ten pieces each with a collision volume , and in LE3 we would assign a mass to each piece, and placing that model anywhere running LE3, all pieces would fall and behave individually based on physics.

 

The goal was to import in LE3 some FBX file contaning many child objects each behaving good with physics when instanced during game.

 

---------------------------------

 

A bug remains , as i put basic collision sphere for the upper child piece, it collides with the base but seems to go throught floor or disappear (it is because each piece is parented to same empty parent object) ?

 

I provided a test map :

- Dezip, place map file on your map directory

- place column.mdl in your model directory directly

- run the game

test.zip

Stop toying and make games

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...