Jump to content
Memo Opaque

About Origin of Meshes

Recommended Posts

That's true, but building a door with a hinge at its edge instead of its middle is hardly a "kludge".  It's simply an alternative approach making a door.  Depending on the application, one approach may be more appropriate than another. It's a good idea to know more than one method.

  • Like 1

Share this post


Link to post
Share on other sites
20 hours ago, Da5id Weatherwax said:

It's pretty easy to rotate around an arbitrary set of coordinates without fussing with balance triangles.. you just multiply the vector from this rotation center to your objects base position by the rotation to get the vector to its post-rotation center and update both its position and rotation in the same call to one of the SetPrimitiveParams group of functions.

Since this has been something we've been able to do from day one, using balance triangles is just sloppy work, an unnecessary kludge.

 

I think the requriements for a good, modern general purpose SL door script would be that it appears to move the object smoothly between positions (not just jump from one to the other), that it doesn't require any manual configuration (just drop the script into the object and start using it) and that it doesn't need to be manually recalibrated if/when the object's base position, rotation or size is changed. And of course, you have to be able to link and unlink to your heart's content without having to worry about scripts going crazy. It's been a few years since The Timeless Door lived up to its name.

An off-center rotation script will always require manual configuration since you have to define exactly where the rotation axis is. Everything else can be done but not easily. If you use llSetPrimitiveParams to rotate, you need a way to slow the script down and you need to include a function to automatically recalculate the parameters every time the object is repositioned or resized.

It gets complicated fast and although it's hard to compare the load of scripts vs geometry, I'm farily confident that a single invisible mesh triangle is less resource heavy than all those extra script functions needed to rotate off center.

There are occasions where an off center rotation script is the best - or even the only - option, but usually it isn't.

 

Edited by ChinRey
Correcting typos
  • Like 3

Share this post


Link to post
Share on other sites
14 hours ago, Da5id Weatherwax said:

You just multiply the vector from this rotation center ...

Might I not just as well say that's simply an alternative kludge to the balance triangle, either being used to overcome the omission of origin offset from mesh uploads, both wasting resources? Origin offset was tested in beta but the dropped. Did anyone discover the reason for that?

  • Like 1

Share this post


Link to post
Share on other sites
18 hours ago, Da5id Weatherwax said:

using balance triangles is just sloppy work, an unnecessary kludge.

Good Luck using TARGET_OMEGA with that. :SwingingFriends: I did the script only approach on a couple of doors in the past. But it's not worth the effort, compared to the extra tirangle, or just a single extra vertex (I tried that recently, and it worked pretty well also.). It's still wobbly, choppy motion unless you do a ridiculous number of steps.
Except for very large gates perhaps, where the dimension would influence the Land Impact too much.

Share this post


Link to post
Share on other sites
3 hours ago, Drongle McMahon said:

Might I not just as well say that's simply an alternative kludge to the balance triangle, either being used to overcome the omission of origin offset from mesh uploads, both wasting resources? Origin offset was tested in beta but the dropped. Did anyone discover the reason for that?

AFAIK the pivot offset worked only on the visual mesh, but the physics shape where still centred. Which led to half the door was phantom, and on one side the way was blocked to the side of the door. IIRC the Lindens where also concerned about encroachment issues with pivot offsets.
The offset on the visual mesh was made possible by Prep, or Vir I think. Making it work on the physics shapes would have been Falcons assignment I guess.

Edited by arton Rotaru

Share this post


Link to post
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.

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.


×
×
  • Create New...