Jump to content

Physics Shape - can't get it to work :-(


Sketchbook
 Share

You are about to reply to a thread that has been inactive for 4332 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi, I have been trying (bangs head) to figure our the physics model so I can make my own.   I have read lots of threads here which get very complex and are over my head (sorry).     I am trying to make a very basic piece of furniture.

I don't need complex physics it's a static piece of furniture so I just need a cube shape.

I built a cube that each corner reached each furthest corner of my model (so 6 polygons) but it isn't working.  I put an illustration of what it would look like (top down view) here - pretending black was my furniture piece and red the physics model.    Should I be creating triangles?

I am very lost and can't seem to get a beginner's level explanation to help me make the right sort of model or any templates to learn from.

Any help much appreciated :-)

 

Cube.jpg

Link to comment
Share on other sites

If you export your cube as a collada file, then from the physics tab of the uploader, choose "Load from File" and select the saved file, it will use that as the physics shape. There must be nothing else in the file (export selected if you are using Blender). If you do mnothing else, it will treat the cube as a collection of triangles, which is no what you want in this case. So you click the "Analyze" button. It will then make a "Convex Hull" from the cube. You should see the information at the bottom chanf from 12 triangles to 1 Hull and 8 vertices. For the simple cube you don't need to do any more. To use the physics shape inworld, you need to select the object to edit, the set  Physics Shape Type  to "Prim" on the Features tab of the edit dialog.

Now, your red box extends outside the bounds of your black furniture in your picture. However, the uploader will stretch and/or squeeze the physics shape until it fits the same cuboid bounding box as your main mesh. So it will not fill the extra red space. In fact you can provide a cube with any dimensions and it will end up fitting the bounding box of the main mesh.

I have assumed here that your furniture is just one mesh object. If it is multiple meshes, then each of them must have its own physics mesh. You will have to provide a collada file with the right number of cubes so that it can use one for each mesh. Obviously, the shape will not then be a single box for the whole collection.

You do have the option of providing the physics shape as a linked object inworld. To do that, don't specify a shape at all on the physics tab. The mesh will upload without a custom  physics shape and the "Prim" option will not be there on the features tab of the edit dialog. Instead, it will use the default convex hull shape that is always made automatically. Now you can make a traditional prim cube the right size for your physics shape and locate it where it needs to be. Then select the mesh followed by shift selecting the physics cube and click the Link button. That will make the cube the root of a linkset contasining the mesh and the cube. Now set the physics shape type of the mesh to "None". Finally select the cube and set its texture to "Default transparent" (which is in the library). Now the linkset will look like the furniture but will behave like the invisible cube as far as physics is concerned. If you unlink the mesh, it will revert to type "Convex Hull", as an isolated mesh cannot have type "None".

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4332 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...