Mewcenary Bernstein
Registered User
Join date: 18 Jul 2005
Posts: 9
|
07-31-2005 09:26
Hi all,
I'm trying to make a book. When it is "opened", the cover should rotate from being closed, to being open.
Pretty simple, but when I attempt to rotate it, the prim rotates around its center, rather than its left hand side. I need it to appear to be rotating around the binder.
Does anyone have any code which will compute this sort of thing? I've found some stuff on the LSL Wiki, but basically it isn't at all clear.
|
Andurant Proudfoot
Registered User
Join date: 11 Jul 2004
Posts: 27
|
07-31-2005 10:23
Isn't this what happens, sort of, with any of the scripted doors in SL? Maybe that thought will help...
|
Branduff Kojima
probably doesn't get it.
Join date: 1 Apr 2004
Posts: 89
|
07-31-2005 10:37
From: Andurant Proudfoot Isn't this what happens, sort of, with any of the scripted doors in SL? Maybe that thought will help... Relating this problem to doors... Whenever I need something to rotate on a certain point, I make another prim to act as a sort of hinge... The rotation script will make the base prim rotate, from it's center, so keep that in mind. also, you could try cutting the book in half, like some doors are made, that would solve the problem, I think.
|
Angus Kuhr
Dwarf with a Hammer
Join date: 17 Jul 2005
Posts: 43
|
07-31-2005 10:42
This should be similar to opening and closing doors.
For that, the Rot commands generally cause the prim to rotate around its X axis. You can set it to rotate around another object, but that gives you an extra prim. To get around the Prim limit, cut the door between .375 and .875. That'll give you a nearly cubic (it won't be absolutely perfect, but close enough that nobody will notice) object that is split in half on its axis. Then, you can give it a Rot command without adding an extra prim. Just be careful about exactly what one you use.
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
07-31-2005 11:20
Another method to get a box that rotates around its edge is to do some prim-torture: create a sphere, set its dimple end to half (you end up with half a sphere) then turn it into a cube, it will stay half-cut.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
Mewcenary Bernstein
Registered User
Join date: 18 Jul 2005
Posts: 9
|
07-31-2005 11:26
From: Angus Kuhr This should be similar to opening and closing doors.
For that, the Rot commands generally cause the prim to rotate around its X axis. You can set it to rotate around another object, but that gives you an extra prim. To get around the Prim limit, cut the door between .375 and .875. That'll give you a nearly cubic (it won't be absolutely perfect, but close enough that nobody will notice) object that is split in half on its axis. Then, you can give it a Rot command without adding an extra prim. Just be careful about exactly what one you use. Thanks for everyone that replied. The solution quoted is the one which worked... cutting it made the prim rotate just where I wanted it to! I had to re-align the textures and so on, but nothing major!
|