Jump to content

custom mesh physics shape going to convex hull instead of prim on state change.


Analyse Dean
 Share

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

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

Recommended Posts

Hi, hope i have the right subforum for this question.


I made a mesh object, with a custom (simple) physics shape that i uploaded simultaneously (load from file). Inworld i set the shape to physics properties "prim" and the rest of the build to none. This works fine, and its all walkable. After putting a vehicle script in (BWind) i noticed something strange, on the final state change, when shutting down the engine, my physics shape changes to convex hull instead of prim, trying to force it to go to prim state by script results in an error, but simply rightclick and edit somehow forces an update and the shape changes back to prim again.

anybody knows what i'm doing wrong here?

 

Link to comment
Share on other sites

Heya,

chances are the Script you are using is changing the settings for the objects physic shape.

I'd rather think it's a matter of solving the scriptual problem then your mesh being wrong. Since this is plain the object setting inworld. And i never ran into a problem of an object, changing all of a sudden its physic settings, wich would have been based on the mesh.

In that case you might want to repeat the question here : http://community.secondlife.com/t5/LSL-Scripting/bd-p/LSLScripting



Link to comment
Share on other sites

I don't know the BWind scripts, and also not how you have built your vehicle. But since a "right click fixes it" it could be this bug also.

https://jira.secondlife.com/browse/SVC-7378?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel


The title of the jira is misleading. The real bug description is in the comments section.

In case you have uploaded your mesh with a "triangle based" (not Analyzed) physics mesh, and you are using llTargetOmega() somewhere in the linkset, the phys mesh will switch to convex hull behavior. Right clicking it forces it to switch back to normal.

  • Like 1
Link to comment
Share on other sites

yay!

 

this solved it, i re uploaded the mesh, custom physics from file and clicked the "analyze" button, (left the rest at default values) now it changes nicely back to prim on a state change.

also, since i build in quads only, i'm pretty sure tri's dont have anything to do with it, just pressing the analyze button bumped my upload fee from 14L$ to 46L$ and the physics cost inworld went from about 6 to 25, so i guess it gets more detailed properties.


thanks a million!

Link to comment
Share on other sites


Analyse Dean wrote:

also, since i build in quads only, i'm pretty sure tri's dont have anything to do with it, just pressing the analyze button bumped my upload fee from 14L$ to 46L$ and the physics cost inworld went from about 6 to 25, so i guess it gets more detailed properties.

 

thanks a million!

 

Any mesh will be converted to triangles on import anyway. So to keep the triangulation under full control, it's best you triangulate your meshes before you export them. A so called "triangle based" physics mesh won't stay at Physics Shape Type: Prim when set physical, like a vehicle, also. It will (should) switch back to Prim type when set non physical though. I would recommend using analyzed physics shapes, and/or regular prims for physics, for vehicles. The bug I mentioned is a pretty nasty one though. Which makes cheap triangle based physics meshes even for houses problematic.

Link to comment
Share on other sites


arton Rotaru wrote:

The bug I mentioned is a pretty nasty one though. Which makes cheap triangle based physics meshes even for houses problematic.


I must be missing something, why is that? What kind of script would set a house to physical and maybe more important, why? I can imagine the bug can cause issues on doors and other moving parts.

I never ran into any problems with houses, the analyzed house physics are worthless for floors though, since you can't rezz anything on them, at least that's my experience. Triangle based shapes always work for me.

Link to comment
Share on other sites

It's fully described in the comments section of the jira I linked to.

And no, you don't have to set a house physical. Let's say you have a simple shack, 4 walls. Now you make a simple triangle based physics shape for it. Then you link in a door which smooth rotates with a llTargetOmega() call. That moment you call llTargetOmega(), the physics change to convex hull behavior, and an avatar standing inside will be pushed out. Right clicking the object corrects the physics to prim type again.

As for the why. Well, it's Second Life, where we have to deal with such oddities each and every day. :matte-motes-big-grin-squint:

Link to comment
Share on other sites

Yup! I guess it's an oversight from correcting some behavior during mesh beta. There was a time when any motion, be it llSetPos(), llSetRot() etc. in a linkset, forced the physics shape to convex hull, regardless of the method used on upload, iirc. But, who knows?

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4112 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...