Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
|
10-20-2009 09:16
Want to rez a prim at the touched position ... point in the right direction? //Sets a grid of x by y, in this case 144 squares and returns that number on touch. float x=12.0; float y=12.0; integer Pos; default{ touch_start(integer total_number){ if (llDetectedTouchFace(0) == -1) llOwnerSay("old client"); else{ vector pos = llDetectedTouchST(0); Pos = ((llFloor((pos.x*10)*x)/10)*(integer)y)+llCeil(pos.y*y); llOwnerSay((string)Pos); } } }
|
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
|
10-20-2009 09:40
If you just want to rez something where you touch it, how about something on the lines of default { state_entry() { }
touch_start(integer total_number) { llRezAtRoot(llGetInventoryName(INVENTORY_OBJECT,0),llDetectedTouchPos(0),ZERO_VECTOR,llGetRot(),0); } }
You might want to allow for an offset, of course, so the object isn't half-buried. But that's the basic method I use, anyway.
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
10-20-2009 15:19
there was a thread on this a couple months or so again i think. i assume you're wanting to change the rez rotation as well depending on the face. with the example given, i was able to rez a sculpted prim, even a complex lattice sculpt, and the "pin" would rez where the sculpty was touch and would be pointing directly into the spot where it was touched eta: here it is! /54/89/334263/1.html
|
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
|
woot!
10-20-2009 16:12
Innula, Ruthven, Thank you! always amazed at the generosity shown in the forums 
|