Jump to content

Disable "Touch" Function on wearable object


Sebjust
 Share

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

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

Recommended Posts

Hello. I made a shirt and worn it. Now I want to disable the "touch" function so that other residents when clicking right-mouse button on my wearable shirt cannot bring up the menu. Can i do this without script?

P.S. i didn't find scripts in content of some brends clothes  but  i can't bring up menu when i click on worn object. They are unselectable

Link to comment
Share on other sites

26 minutes ago, Sebjust said:

Hello. I made a shirt and worn it. Now I want to disable the "touch" function so that other residents when clicking right-mouse button on my wearable shirt cannot bring up the menu. Can i do this without script?

P.S. i didn't find scripts in content of some brends clothes  but  i can't bring up menu when i click on worn object. They are unselectable

There's no way to disable the right-click menu for others, by script or any other means.  The most likely reason why you find yourself unable to select certain items of rigged clothing is because the clothings placement on the avatar doesn't coincide with the point it's attached to.

For example, if you make a hat and rig it to the avatars head then attach it to your hand the hat will still appear on your avatars head, however if you try to right click the hat you won't be able to interact with it since the viewer isn't able to take into account the deformations caused by rigging an object to the bones in the avatar rig.  The same is true of animesh when animated, in that if you want to select it you need to right click the origin point of the object rather than the spot the animated mesh surface appears to be in.

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

As Fluffy has said (whilst I was beavering away at the keys), you can't disable the right-click menu, but you can remove the touch part that an object may have inherited, which causes the cursor the change when hovering over the object.

 

Create a new script inside it, it should then say "Hello Avatar"

Edit the script and just after the line llSay(0, "Hello Avatar");

add the new line 

llSetClickAction(CLICK_ACTION_NONE);

 

If there is a

touch_start(integer num_detected) line followed by

{

then some code and a final

delete that block.

 

Save the script , make sure there are no syntax erors.

Check that touching it does nothing.

Delete the script.

 

Edited by Profaitchikenz Haiku
Link to comment
Share on other sites

3 minutes ago, Profaitchikenz Haiku said:

I'm sure you're right, but you never know these days, it might be time for me to be right once again :)

Well this thread will no doubt show up in any search related to disabling touch events so even if it's not the right answer for the OP, it's most likely going to be exactly what some people are looking for in the future! ;) 

Link to comment
Share on other sites

33 minutes ago, Fluffy Sharkfin said:

There's no way to disable the right-click menu for others, by script or any other means.  The most likely reason why you find yourself unable to select certain items of rigged clothing is because the clothings placement on the avatar doesn't coincide with the point it's attached to.

For example, if you make a hat and rig it to the avatars head then attach it to your hand the hat will still appear on your avatars head, however if you try to right click the hat you won't be able to interact with it since the viewer isn't able to take into account the deformations caused by rigging an object to the bones in the avatar rig.  The same is true of animesh when animated, in that if you want to select it you need to right click the origin point of the object rather than the spot the animated mesh surface appears to be in.

Does this explain why I cannot right click and select detach for some very obvious items like a dress or top? And if so, would I be able to simply add it to a more appropriate attachment point and have ability to detach it then?

Edited by Arielle Popstar
Link to comment
Share on other sites

Just now, Arielle Popstar said:

Does this explain why I cannot right click and select detach for some very obvious items like a dress or top? And if so, would I be able to simply add it to a more appropriate attachment point and have ability to to detach it then?

It depends on the item to some extent.

Some rigged items when rezzed have a completely different scale since the polygons of a rigged mesh object will "snap into place" on the avatar when worn and not all creators import their mesh at the correct scale or bother to resize it afterwards.

In other cases the origin point of the mesh will be offset from the mesh surface by such a large amount that its polygons are some distance from the point it's attached to, which makes selecting it difficult regardless of what attachment point you use. 

However as long as the dimensions of the mesh object aren't tiny, the origin point for the mesh isn't offset too far and the attachment point roughly coincides with the visual placement of the clothing when worn then it certainly increases your chances of being able to right-click and interact with a rigged attachment.

  • Thanks 1
Link to comment
Share on other sites

6 minutes ago, Fluffy Sharkfin said:

It depends on the item to some extent.

Some rigged items when rezzed have a completely different scale since the polygons of a rigged mesh object will "snap into place" on the avatar when worn and not all creators import their mesh at the correct scale or bother to resize it afterwards.

In other cases the origin point of the mesh will be offset from the mesh surface by such a large amount that its polygons are some distance from the point it's attached to, which makes selecting it difficult regardless of what attachment point you use. 

However as long as the dimensions of the mesh object aren't tiny, the origin point for the mesh isn't offset too far and the attachment point roughly coincides with the visual placement of the clothing when worn then it certainly increases your chances of being able to right-click and interact with a rigged attachment.

Thank you! I have been asking people like Linden's, tpv viewer devs, other creators as to why I could in some cases but not in others and not one has been able to explain the reason. It is my preferred way of detaching clothes.

Thank you for solving the mystery. 👍

Link to comment
Share on other sites

Just now, Arielle Popstar said:

Thank you! I have been asking people like Linden's, tpv viewer devs, other creators as to why I could in some cases but not in others and not one has been able to explain the reason. It is my preferred way of detaching clothes.

Thank you for solving the mystery. 👍

Glad to have helped clear up the mystery for you. :) 

If you discover an item that seems unselectable even after changing attachment points then as long as it's modifiable you can always try rezzing it to check what size it is and where it's origin point is in relation to the mesh surface.  If the item is too large or small simply resize it to roughly the same size as it appears when worn, and if the origin is offset too far from the mesh you can try linking a regular prim to it (as close to the origin point as possible) and making the prim 100% transparent.  The non-rigged prim part of the linkset will remain in position on the attachment point and will allow you to right click it and detach the entire object.

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, StarlanderGoods said:

If its mesh, add an invisible root prim, and hide that prim inside your body, it´s not 100% anti-touch, but it adds a layer of difficulty.

 

Thank you. This is exactly what i want to get. It's work perfectly!

Thanks to  all for replies. You are great

Link to comment
Share on other sites

2 hours ago, Sebjust said:

Hello. I made a shirt and worn it. Now I want to disable the "touch" function so that other residents when clicking right-mouse button on my wearable shirt cannot bring up the menu. Can i do this without script?

P.S. i didn't find scripts in content of some brends clothes  but  i can't bring up menu when i click on worn object. They are unselectable

Alternatively, if you can edit the script, you can stop other people clicking your shirt and bringing up the dialog menu by finding the touch_start() or touch_end() function and enclosing everything inside it with a security check, thus:

	touch_start(integer total_number)
	{
		key k = llDetectedKey(0);
		if(k ==llGetOwner()){//if the toucher is the owner
			//now, everthing currently inside the touch function
			

		}//close the pair of {} here
	}//end of touch_start funtion

This allows you to access the menu, but no one else

Edited by Innula Zenovka
Link to comment
Share on other sites

IMO making it so people *cannot* see what a item is or who made it, to me means to not support the creator.

If you wear something and you like it, you should by all means allow people to inspect the item. Because if someone sees it and they like it, then that means the creator will get more traffic on the marketplace, thus supporting the creator and helping them make even more stuff in the future.

If the concern is over copybotting, copybotters don't need to click the item. They just have to right click the name tag and click export.

Edited by Chaser Zaks
  • Like 2
Link to comment
Share on other sites

On 2/5/2022 at 2:47 PM, Fluffy Sharkfin said:

Glad to have helped clear up the mystery for you. :) 

If you discover an item that seems unselectable even after changing attachment points then as long as it's modifiable you can always try rezzing it to check what size it is and where it's origin point is in relation to the mesh surface.  If the item is too large or small simply resize it to roughly the same size as it appears when worn, and if the origin is offset too far from the mesh you can try linking a regular prim to it (as close to the origin point as possible) and making the prim 100% transparent.  The non-rigged prim part of the linkset will remain in position on the attachment point and will allow you to right click it and detach the entire object.

I find that the ones which are unselectable always have a tiny root prim somewhere. If its mod and you can delete the root (assuming that it doesn't break texture scripts etc) then it works. 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 781 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...