Jump to content

What am I doing wrong?


Lash Carver
 Share

You are about to reply to a thread that has been inactive for 3536 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

llRezObject(Object,llGetPos()+<0.7,0,0>*llGetRot(),<0,0,0>,(llEuler2Rot(<0,1,0>*DEG_TO_RAD)*llGetRot()),0);

 

I'm trying to rez an object infront of me from a HUD but when I spin in a circle and keep rezzing, they aren't evenly around me. Like my offset of <0.7,0,0> is less on one side but more on the other.

 

What is wrong with my calulation? I want it to always rez 7m infront of me nomatter what way I face.

Link to comment
Share on other sites

I would use llRezAtRoot rather then llRezObject, though I doubt that's what's causing the problem.   I think you've run into two of SL's limitations here.

The first is  simply that llGetPos()  returns your actual position on the sim rather than where your AO makes you appear to be.   Normally this shouldn't be as obvious, but when it's a small distance (0.7 of a metre, not 7 metres) it's going to be visible.   

The second, and far worse, problem is that llGetRot is borked when called from an attachment, unless the avatar is seated or in mouselook.  See the "Caveats" in the wiki for llGetRot().

I've wrestled with this in the past, and never found a satisfactory work-round.   It's accurate to within a few degrees, and that's all you need for most purposes, but you'll never get accurate results unless you go into mouselook or sit on something to rez stuff from your hud.

Sorry to be the bearer of bad tidings.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3536 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...