Skip to main content
New Participant
August 31, 2025

Disabling hand grabbed object when entering a region

  • August 31, 2025
  • 1 reply
  • 78 views

I have a 3D game object, Player that is grabbed and moved by hand or controller (ISDK). When it enters a specific game object,  RestrictedZone, it should freeze not to move in. Movement of hand or controller should not cause the object to enter. But can be taken out of this region and moved. I tried several ways nothing worked as it’s grabbed and moved with button  press. 
any help is appreciated. 

This topic has been closed for replies.

1 reply

RiverExplorer
Honored Contributor
August 31, 2025

"Not to move in". Maybe make an object (Say a Cube,) make it the size of this region. Make sure it has a collider. Then disable its mesh renderer. Now you have a region that is invisible that the player can not enter.

Or if you mean the player is put into a no-move region until some action is taken.  Set a flag when you do not want them to move, then unset it when you want them to move again.

void OnMove(...) { if (OkToMove)  norman-move-stuff else ... }

I do the same thing with important pop-up or menus. When they pop up, I disable move until they  answer the question, cancel, or whatever I want done.

 

 

RiverExplorer.US]@gmail.com https://RiverExplorer.games