|
Nectere Niven
Gadget Junky
Join date: 12 Jan 2007
Posts: 211
|
03-17-2008 11:50
Is it possible to target a specific point on an avatars body - for instance their head? That would take in account all the different possible heights of various avatars - say I want a particle stream or something to target the avatar head instead of the usual center - possible?
|
|
Dylan Rickenbacker
Animator
Join date: 11 Oct 2006
Posts: 365
|
03-17-2008 12:00
Assuming the av is standing upright, llGetAgentSize() might work for targeting the head.
|
|
Nectere Niven
Gadget Junky
Join date: 12 Jan 2007
Posts: 211
|
03-17-2008 12:03
yep been looking at that snipet - just not sure how to go about implementing the target height once its detected size - so I wasnt sure if it was possible or not
|
|
Django Yifu
Beat Island Gaffer
Join date: 7 May 2007
Posts: 189
|
03-18-2008 04:16
cast the bounding box vector of llGetAgentSize() to something like
vector height = llGetAgentSize();
then you can use the z coordinate of the vector for your height in another location vector, however if you are using an avatar position as the target vector the vector given will be at the center of the avatar so you would have to half their height and add it to the target vector
float offset = height.z;
vector target_avatar = llDetectedPos(0);
vector target_vector = <target_avatar.x, target_avatar.y, target_avatar.z + offset);
Hmmm. Something along those lines although I'm sure some clever soul will come in and give you a better example.
_____________________
Tread softly upon the Earth for you walk on my face.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
03-18-2008 22:44
heh I suggested a similar method once, but got drowned out by the 'move a rezzed target prim' crowd... both are options
_____________________
| | . "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... | - 
|