Change font size
It is currently Thu Mar 22, 2018 1:18 am

Forum rules


Post a new topicPost a reply Page 1 of 1   [ 2 posts ]
Author Message
 Post subject: Rotating Sky Island
PostPosted: Thu Sep 27, 2012 10:17 pm 
Furious Typer
User avatar

Joined: Mon Aug 10, 2009 11:53 pm
Posts: 258
Hi all,

So here is the concept:
You have this nifty, hugemongous island you've built, floating in the sky. Wouldn't it be cool to make it rotate?

The only problem is, for smooth rotation, using TargetOmega - that is client side only, so your visitors will be sinking into the island terrain as it rotates around them, but the world terrain sits static as they walk around on it.

Here is a little script I wrote that helps with that issue. Target Omega keeps it smooth, with a rotation that follows along actually rotating your island so everything keeps in line for 'walkability'!!

Keep rotation SLOW: Unfortunately, no matter what I've found, unless you're sitting on something, your avatar is going to stay in place while the island rotates by when you're not moving around. So slow is majestic... fast is just kinda weird. But fun. lol

There are a couple of variables to play with. Real rotation of the object / island, and the 'omega / smooth' rotation. Have to play around a bit to keep them synced up. You can see an example at: IspbelandVP, 129, 88, 197
Or just go to the region, walk in the cave. It will tp you to the floating island. The portal on the island will take you someplace nice. Don't worry about Teh Ogre - he's harmless. I'll check the permissions of the items and make the terrain everything full perms so feel free to take a copy if you like. I've never gotten the UV maps to come out of blender that well so my landscape texture isn't the best, but I'm still learning so... it is what it is. Please note I didn't make the sculptie rocks, but they are freebies I copied from somewhere in OSGrid so kudos where appropriate.

// TargetOmega and Standard Rotation matching
// Haplo Voss 9-27-12
// EZCHEEZE License - just use it and enjoy, distribute freely :)

float gRotRate = .015; // This is the actual rate at which your object physically rotates in the world
float gTomRate = .002; // This is the rate at which the client sees the object rotate.
rotation gRot;         // Note that there is nearly a decimal point difference between them. Easy to tweak.
float gIntRot = .1;    // This is a multiplier. Only change if you want to use this script for much faster or imperceptible purposes
integer debug = FALSE;

    if (debug) llOwnerSay("State: Default");
    gRot = llEuler2Rot( <0.0, gIntRot, 0.0> * DEG_TO_RAD );

  touch_start( integer IntTouched )
    state rotate;

state rotate
        if (debug) llOwnerSay("State: Rotate");
        llSetTimerEvent(0.5);       // Every .5 seconds our object rotation gets synced in-world.
        gRot = llEuler2Rot( <0.0, 0.0, gRotRate> * DEG_TO_RAD );
        gRot.s *= gIntRot;
    touch_start(integer stopped)
        llSetLocalRot(llEuler2Rot( <0.0, 0.0, 0.0> * DEG_TO_RAD ));
        state default;
        llSetLocalRot( gRot * llGetLocalRot() );

Sorry, I was just thinking upon the immortal words of Socrates who said ... "I drank what?? ... "
- Real Genius

 Post subject: Re: Rotating Sky Island
PostPosted: Thu Oct 11, 2012 3:46 pm 

Joined: Fri Apr 13, 2012 1:19 am
Posts: 26
One of the first concepts I came up with for SL had similar problems. I asked myself what architecture would be like in a world where everyone can fly and teleport. I came up with a concept “house” where every “room” was a separate bubble drifting around in the air. I wrote a cool chaotic drifting algorithm where the bubble-rooms would slowly drift down, move towards a central point, then rise up as if in an updraft, drift sideways and start back down again. Imagine the changing views through the transparent bubble walls as you sat in your living room talking with friends.
Each room had a teleport panel for jumping to any of the other rooms. The panels communicated with each other to find the current position of your destination and send you there. One room was anchored in the ground (at the center of the updraft) and open on the side so you can walk into it and use the TP panel to get to other rooms. One Room had an open ceiling so you could fly into it and use the TP panel from there.
In a virtual world, ANYTHING should be possible, right? WRONG. This concept ran into problems in every direction. First of all it is difficult to get smooth motion. llMoveToTarget has “energy” limits and cannot lift a large room. Vehicles have prim limits. Since your furniture must be linked with the room to follow it, this was a big problem. Non-physical movement is jerky (until llSetKeyframedMotion).
The Havok 3 physics SL used at the time did not have friction. If the floor of the room you were in moved sideways, you just stood still frictionlessly until the wall of the room arrived and shoved you around. If the room moved down, you fell to catch up. If the room moved up, sometimes you jumped up to follow, sometimes your feet got too deep into the floor you would fall through the floor and out of the room. The avatar jumps and jerks with every movement like this. Even Havok 4 which does have translational friction, does not have rotational friction. If the room rotated, you frictionlessly stood still while the floor turned under you. I tried writing scripts to push you in the direction the room was moving, I tried making attachments that impulsed you to follow the room as it moved. I had feedback loops with these pushers not matching the room speed. Also the avatar tended to turn in the direction of the push and move his/her legs as if walking, when s/he was actually standing still relative to the room. I eventually gave up, or shelved that project for future inspiration.

Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 2 posts ]

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of