I’m trying to assign my camera as a transform parent to a Leap Motion object that draws finger objects based on the data it gets from the Leap device (here the script attached to the Leap Motion object: lightitup/Assets/Scripts/Leap/LeapUnityBridge.cs at master · brennon/lightitup · GitHub) with these two lines of code:
GameObject.Find(“LeapMotion”).GetComponent().m_InputParent = cameramain;
GameObject.Find(“LeapMotion”).GetComponent().enabled = true;
but as soon as enabling the bridge script component the camera pointed by cameramain moves away in the scene, despite its view remaining exactly the same as before in-game.
As the hand object gets drawn in the same position as the parent it’s attached to, it gets drawn far away from the camera’s point of view (unchanged), matching the new odd position of the camera object.
I hope you can see it decently in this screenshot: