Jump to content

How to rotate a child MESH prim (about a virtual 'edge')


Restless Swords
 Share

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

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

Recommended Posts

We have all used cut boxes to make rotating prim doors.  but what if that door were a mesh child-prim?  you cant have a larger cut-away part since transparent pieces get deleted from mesh,  and its edge may be odd shaped and the rotation axis might not even be at that edge.

The closest idea i have come up with is wasteful, it is to create a larger mesh prim with half of it being a unique face that I can set to transparent once the mesh piece is imported in SL, giving a similar design as the standard cut-away prim door.  This of course assumes you have access to the mesh piece in a 3D modeller (like Blender) to add the extra face, and does not work if you have a mesh piece obtained from some other place.

Is there a standard code snippet that will rotate an arbitrary prim around a defined axis (can be limited to X-Y-Z only) some arbitrary defined distance from the prim center? 

- and yes, i understand it will actually involve both roratin and translation

- Or is it still best to just build a double-sized prim and hide half of it?

 

 

Link to comment
Share on other sites

It's pretty normal for mesh door creators to add a single triangle in order to move the pivot point to the door edge. You can make it a tiny triangle and either be a separate face that you later make transparent, or work it into the texture for one of the faces so that it falls in an area that is transparent.

Try googling Rotate Prim On Edge. There was a script, I think posted in the library, that does just that. I'm not in world to look it up in my inventory

Link to comment
Share on other sites

How about this thread? :matte-motes-tongue:

https://community.secondlife.com/t5/LSL-Scripting/How-to-rotate-linked-prim-around-its-edge/td-p/2260919

And a quick and dirty GIF how to offset the pivot point on a mesh utilizing a degenerated triangle which won't render in-world. Hence, no additional materials, or transparency are required.



 

Link to comment
Share on other sites

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