|
Johnny Mann
Registered User
Join date: 1 Oct 2005
Posts: 202
|
06-07-2006 15:04
Hi Guys, Im working on a Rez Vendor that rezzes an object a lil off the Y axis (toward the shoppers view) However, when I rotate the vendor is seems to not take the local position, but rather the global anotherwords it rezzes the Y on a global pos. Here is the meat and potatoes of my script: string nName = "Object" state_entry() { llRezObject(nName, llGetLocalPos() + <0, -0.5, 0.5>, ZERO_VECTOR, ZERO_ROTATION, 42); state time; } }
Anyways - Thanks to anyone who can figure this out -Johnny Mann
|
|
Thraxis Epsilon
Registered User
Join date: 31 Aug 2005
Posts: 211
|
06-07-2006 16:03
Try using llGetPos()
|
|
Johnny Mann
Registered User
Join date: 1 Oct 2005
Posts: 202
|
06-07-2006 16:31
From: Thraxis Epsilon Try using llGetPos() Well that's where I started. It has the same exact effect,
|
|
Alphazero Sugar
Noob Tube
Join date: 24 Mar 2005
Posts: 60
|
06-07-2006 16:52
You probably want something like: string nName = "Object" state_entry() { llRezObject(nName, llGetLocalPos() + <0, -0.5, 0.5>*llGetRot(), ZERO_VECTOR, ZERO_ROTATION, 42); state time; } }
If the script is on the root prim, llGetPos() and llGetLocalPos() do the same thing I believe. You want to rotate your offset by the object's rotation before applying it to the current position.
|
|
Johnny Mann
Registered User
Join date: 1 Oct 2005
Posts: 202
|
06-07-2006 18:04
Thanks!
Works Great. I see - it was all about rotation!
|