Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Anonymous's avatar
Anonymous
12 years ago

Trying to add AltFollowOrientation

Howdy hey! This issue may not technically be an OVR-specific question, but I'm hoping someone will still be able to help... I need to either access/change FollowOrientation from another script which happens to be Javascript, or I'd like to add an AltFollowOrientation and switch between them from there. I don't know much C#, nor do I have any idea how to get C# and Javascript to interact with each other in Unity (any insight?), so I decided to go with the second option. I added my AltFollowOrientation definition to OVRCameraController just under the original FollowOrientation definition, but it doesn't show up in the inspector. Any idea as to why? There are zero compiler errors.

Code looks like this:

public Transform FollowOrientation = null;
public Transform AltFollowOrientation = null;

2 Replies

Replies have been turned off for this discussion
  • drash's avatar
    drash
    Heroic Explorer
    In SDK 0.2.4 they've started to use their own inspector interface as defined in OVR/Editor/OVRCameraControllerEditor.cs -- you'll have to make some changes there too.

    However, it seems like it would be simpler just to change the FollowOrientation value by script -- things would flow better code-wise if you were to do that.
  • Anonymous's avatar
    Anonymous
    Thanks! I will have a look at that script. Sounds like it might be just what I need.
    --a short time passes---
    Well I got it to show up in the inspector, but now both fields stay on "None (Transform)" after I attempt to select a transform. A bit more tinkering is in order.