Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Need Some Help

Zac Bunderfeld
Registered User
Join date: 19 Mar 2004
Posts: 16
01-31-2005 19:01
I am writing an office inside a sphere that follows me around, and expands on command.

I am making the insides a linked object which will be rezzed by the sphere on my command. I need to make it so that it rezzes the object at certain coordinates relative to it. I was taking it one number at a time and got the height right. But I need to subtract the first coordinates (X). How can I do this? What I currently have is:

llRezObject("OfficeSphere Insides", llGetPos()+<-0.002,0,0.195>,ZERO_VECTOR,ZERO_ROTATION,42);

But that's only doing the height correctly, not the subtracted command. I can get them functioning seperately but not together.

Could someone help me a bit?

-Zac

NOTE: actually, scratch that. just tested. The height will work (GetPos()+<0,0,0.195>;) but the X coordinate will NOT work by itself (GetPos()-<0.002,0,0>;). That should help.
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
01-31-2005 19:47
Not sure if I see the problem, unless the sphere itself is not the scripted object. llRezObject rezzes something relative to sim coordinates, and llGetPos() should give you the root primitive your script is in - so it's possible the problem you're experiencing is due to a rotational offset problem with the prim the script is in.

In other words, make sure the center of your object is dead center in the sphere, take two pills, and call me in the morning. ;)

Furthermore, you might need to offset based on rotation. To do this:

CODE
llRezObject("Object Name Here",llGetPos()+ (llGetRot() / <0,0,0>),ZERO_VECTOR,llGetRot(),1);

... where <0,0,0> is your offset.
_____________________
---
Zac Bunderfeld
Registered User
Join date: 19 Mar 2004
Posts: 16
01-31-2005 19:50
It's not in the center, otherwise I wouldn't need to change the relative coordinates with GetPos. I dunno about rotation though.

But it's weird that Z works and X doesen't. I mean, the X equation just don't do nothing. Hmm...

-Zac

EDIT: So 0,0,0 would be the rotation of the sphere? Or the insides?? -Z
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
01-31-2005 19:51
Yeah. I realized that when I reread what I just typed. See above. :p
_____________________
---
Zac Bunderfeld
Registered User
Join date: 19 Mar 2004
Posts: 16
02-04-2005 17:04
Sorry to bump the thread, but isn't there any help? I really want to get this working. :)

-Zac