Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

problem with spinning prims

RiddleRay Rembrandt
Registered User
Join date: 13 Mar 2009
Posts: 28
09-01-2009 05:00
I have a weird problem with spinning prims.

i made 2 flat cylinders. one is big one is smallersmaller is aligned to centre of the bigger one, bigger one has rotaing scripts, and then i linked them, making smaller one as master prim. now i can rotate them like 90 degrees and it spins perfectly ( its like a car wheel whatever rotation it is it still spins the same way. (usually if you turn the spinning object its starting to rotate) Now i want to add 8 spikes to it. spikes are like numbers on a clock. so in the end they should all spinning together and what ever way i turn the selected prims it should spin as a car wheel not like rotating coin.

if i add those spikes to my selection it works fine only that spikes toesnt spin with rest of the prims (master prim doesnt spin either but it must be that way, but how to get spikes to spin
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
09-01-2009 06:28
Don't rotate the spikes by turning their prim. Use llTargetOmega instead and rotate them as a texture. It's a client side effect. Get hold of a vehicle and study the way its creator has managed to get the wheels to rotate properly even as you turn a corner. See http://lslwiki.net/lslwiki/wakka.php?wakka=llTargetOmega.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
RiddleRay Rembrandt
Registered User
Join date: 13 Mar 2009
Posts: 28
09-01-2009 06:52
i use that script and i dont want to rotate every spike they should rotate together not each every one see the image http://www.upload.ee/image/180026/rotator.png left is what you think right is what i need :D
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
09-01-2009 10:32
Link the spikes to the wheel, and then put the llTargetOmega script in the wheel. Here's the relevant concept, quoted from the lslwiki.net page:

"This function can be used in a child link (in which case the child will rotate locally around its own center) or in a root link, in which case the entire linkset will rotate around the root's origin."

Make sense? Put the script in a child prim, and you get the example on the left in your picture. The child prim spins around its own center. But put the script in the parent prim (also called the "root prim";), and you get your example on the right. The whole linkset spins around the parent's center.

This, of course, will prevent you from in turn being able to link the wheel to anything else. For this method to work, the wheel must be a parent, not a child. SL does not support multi-level hierarchy, unfortunately.

If you need the wheel to be attached to another object, like a car or something, I'd use a different construction technique. Instead of using cylinders for the spikes, use severely cut toruses. That way, they can all have the same center point. Here's an example:



The wheel in the center is selected, so you can see the highlighting, to show how its put together. The blue object on the right is an uncut version of the same torus each of the spikes are made of. Notice about 90% of it has been cut away in the red versions.


Of course, an even better option would be to sculpt the spikes instead of using prims. You could get several spikes out of one sculpty, and you could put the center anywhere you want it.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
RiddleRay Rembrandt
Registered User
Join date: 13 Mar 2009
Posts: 28
09-01-2009 14:51
well those spikes will have flexi on them so sculpty is not an option
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
09-01-2009 19:12
If they need to flex, then the torus wouldn't be an option either. I'd say you're probably out of luck on this one. SL does have its limitations. There are only so many things a build can do at once. Spinning off axis, AND being flexible, AND being a child of another object is a pretty tall order.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.