Profile image

Camera Mod

7,603 josephejkhdsfoidsf  7.4 years ago

Is there a way to add a new camera view into the game? I'm trying to implement SteamVR, however I'm not sure if it would work or not. Any ideas?

  • Log in to leave a comment
  • Profile image
    18.8k mushr0om

    @JosephB2001 Hangouts Mushr0om SP
    skype jonasm0508

    7.4 years ago
  • Profile image

    @mushr0om I have discord hangouts and Skype!

    7.4 years ago
  • Profile image

    @mushr0om yeah, but I don't know if I'll be on tonight as I have school tomorrow. When are you available?

    7.4 years ago
  • Profile image
    18.8k mushr0om

    @JosephB2001 Do you have hangouts, discord or skype?

    7.4 years ago
  • Profile image
    Dev WNP78

    @JosephB2001 does the prefab have a rigidbody in it? Also, is it attached to the plabe and does it have a collider? I would make sure it works in the editor before putting it in sp.

    7.4 years ago
  • Profile image

    @mushr0om Ok, I'll try!

    7.4 years ago
  • Profile image
    18.8k mushr0om

    And if you can't get be to work you probably can create your own with stereoscopic camera and rotation based on headset rotation

    7.4 years ago
  • Profile image
    18.8k mushr0om

    @JosephB2001 looks like errors coming from steam vr. You can try to save the whole folder asset when exporting the mod, idk if it will help though

    7.4 years ago
  • Profile image

    @mushr0om
    @WNP78

    SteamVR CameraRig added to part and SteamVR prefab seperate. (doesn't change results if SteamVR prefab is in Part) results in this error although maybe that is a result of disabling the camera using Camera.main.enabled = false; I also get errors in the console:

    http://prntscr.com/fsucai
    and
    http://prntscr.com/fsucfp

    7.4 years ago
  • Profile image
    Dev WNP78

    @JosephB2001 I think it would be better to put it inside a part object. Just put the camera rig on the part and it should work.. you'll need to disable the main camera with service provider or just do Camera.main.enabled = false;

    7.4 years ago
  • Profile image

    @mushr0om Yes, there is a SteamVR asset that you can download which includes a camera prefab. In later versions of Unity, it is built in, but SimplePlanes doens't work with those versions! It still isn't working however I am just experimenting now really haha. Maybe it's not possible. It tries to load in the headset when I load a map (I have it everything inside a Map Plugin game object. Sorry for wasting your time, though.

    7.4 years ago
  • Profile image
    18.8k mushr0om

    Also is steam vr for unity 5.3 or lower? If not it can be hard

    7.4 years ago
  • Profile image
    18.8k mushr0om

    You can find the main camera with camera.main. If you don't want to follow the aircraft with your own script you can it as parent to your camera with transform.parent = camera.main.transform

    7.4 years ago
  • Profile image
    Dev WNP78

    @JosephB2001 huh..... have you tried it on multiple camera views? Maybe you could make a part which is your viewpoint?

    7.4 years ago
  • Profile image

    Accessing
    ServiceProvider.Instance.GameCamera.CameraPosition.position;

    gives a NullReferenceException: Object reference not set to an instance of an object.

    @WNP78

    7.4 years ago
  • Profile image
    Dev WNP78

    uh, you can start by using the ServiceProvider.Instance.GameCamera.SetMainCameraEnabled(false) to disable the normal camera, create your own, using the position of ServiceProvider.Instance.GameCamera.CameraPosition

    7.4 years ago
  • Profile image

    @HellFireKoder ;)

    7.4 years ago