|
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
|
07-10-2007 15:23
Ok, I have a classic problem with a new twist!
The classic problem: I have an object with a child prim, that I need to rotate about an arbitary axis defined by coordinates in the child coordinate system. Is there a standard script for this somewhere?
The new twist: This prim is heavily hollowed and heavily cut. That means that the "centre" of the prim, in SL terms, is a long way from the centre of the 'percieved prim' (ie, the bit that you can see, that is neither cut away nor hollowed out). Of course, it's the percieved prim that needs to be percieved to rotate about the axis, not the blank bit... So is there a way to define the pivot point both in terms of a point in object space that is the axis, *and* a line in the local system of the particular *prim* which has to line up with that axis?
|
|
Fearal Cortes
Registered User
Join date: 10 Feb 2007
Posts: 7
|
07-17-2007 21:29
I think the simplest solution for this problem would be to use the llSetPos and llSetLocalRot functions tu specify the position and rotation that you want your child prim to take. Ofcourse this wont create the effect of seeing the prim rotate around some arbitary axis. What I mean is that although you would see the final position and rotation desired you wouldn't be able to see the prim moving uniformly on that axis to achieve it.
I posted the same question some time ago, I needed a hatch to swing on an arbitary axis, and since the center of the hatch wasn't on the desired axis I had to use that method. The only drawback to this is that I get a cheap effect where instead of the prim swinging smoothly , it rotates first in one axis and then in the other to achieve the rotation desired. I would prefer the swinging smoothly effect but I don't see any workarounds for it.
So.. after all that rambling... that's pretty much what you're going to get if you use this method.
|