|
Robbi Rockett
Registered User
Join date: 23 Jan 2007
Posts: 12
|
12-13-2008 14:51
I wish to make a cube rotate in a certain manner. I hope I can explain it correctly. I tried in the scripting group and they were off on wild tangents with physics and ropes and pendulums and sl's shortcomings.
Assume a stationary default cube above the ground with a long thin cylinder sticking straight down out of it and into sand below. If you tilted the cube a little back and forth the cylinder would draw a line in the sand. Instead of a line though I want to draw a circle or ellipse in the sand. Can someone help me with this so i would be able to tilt/rotate the cube to continuously draw this circle/ellipse?
Thanks, Robbi Rockett
|
|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
12-13-2008 16:02
But you want the center of gravity of the cube to stay stationary, right?
The this is just a llTargetOmega() around the world (not local) Z axis.
_____________________
So many monkeys, so little Shakespeare.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
12-14-2008 03:27
I'm guessing at your intent here, if said cube were spinning fast enough, the rod from the botom would describe the outside of a cone, yes?
if so, you can actually treat it as matter of facing the cube at an offset point rotating in a circle.
the easiest way to find that point is to describe a circle around your cube, then lift it by a set amount higher than your cube.
another way towards that end is to calculate the offset angles of x and y as viewed from above and apply them as incremental changes in rotation
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|