I have a scene where I am using SteamVR_LaserPointer.cs to pick an interactive object.
Once the object is picked I am changing the scene.
Just before I change scene I disable the SteamVR_LaserPointer.cs script.
But in the new scene the Laser Pointer is still there and visible on the Control and yet the Script for it is disabled.
Does anyone have any idea how I can turn this thing off???
@diggerjohn greetings from the future! I just solved this one for myself in the SteamVR 2.2 package. It takes an alteration to the SteamVR_LaserPointer.cs script. In the Update() function, the first thing you see is this:
isActive = true;
This seems to do nothing, and forces the laser to always be on. Also, the “active” public variable appears to do nothing. Period. Instead, replace that isActive section to this:
if(active != isActive)
isActive = active;
This allows you to actually turn the laser on/off by setting the public variable “active” to true or false. Alter to taste if you need other functionality to still be active when the visible laser is off.
Hey guys thanks for tracking this.
I am happy to say I SOLVED this little problem.
I migrated to VRTK.
No worries about Steam updates braking my code any more.
Strongly recommend it.