Forum rules - please read before posting.

Error on Unity 5 with Depth Of Fiels + 3 Player

edited March 2015 in Technical Q&A
Hi,

I think there are some problems with more than one player and for example the effect "Depth of Field" (Unity4 Pro/Unity5). I can add my player from scene  to the "Focus on Transform" because it doesn't work with the prefab, but that InScene-Player does not always work together with the Inventory or the script "if Player x active..." - that is working if I don't have any player in the scene... 

ok maybe I have to do some complete other way to do it... or is it a Bug? 
Soooo - I don't know, maybe it's a good idea to wait for bugfixing of the 

Boss: "Oh my god, Unreal is for free - throw out what ever in pipeline"
[poor guy1]: "ahm... boss I don't think, that is a good idea because of the qua...." 
Boss: "YOU ARE FIRED! - [to poor guy2] You! JUST DO IT!"... 

;-)

But - seriously - I thing there is a lot to fix cause of the big 5 - so keep on. 
I want to say - good work, I'm very happy with AC!

Best Regards - Ley

Comments

  • Ok, I think there is a solution. There is need to tell the Main-Camera-effects on startup and if player is switching, that the focus of transform has to be updated. (Oh gosh, my english is very bad, but it's late - sorry)

    Maybe there is a way to add this feature (or tell me the destination of the always existing trigger) or I post my solution the next days... ;-)

    Good night - Ley
  • edited March 2015
    Good Morning.

    ok it's working if I do this:
    MainCamera: Focus On Transform: NONE!

    And my Game-Cameras know what to do... soooo, the only thing was to ignore the field..... 
    maybe AC is too smart 

    :)

    Nice Day - Ley
  • Thank you for posting.  If the GameCamera's DOF values don't update when you switch player, I'll fix it.
  • I'd like to know how you achieve the DOF effect in AC . I'm on the AC 3D tutorial ( and I've added the El_TinPot Player Prefab to the Focus On Transform slot in the Main Camera/DOF script). It adds a DOF effect but the focus does not appear to follow the Player in play mode. Have I missed something? Do I need to add a script which returns a focus distance value to the DOF script???
    Thanks
    John
  • As the "Focus On Transform" field is not part of an AC component, I can't speak for how it works. However, check that the slot references the player gamobject within the scene, not the prefab.  If the player is not in the scene, you can drag the prefab into the scene and he'll be available for other components that might reference him.

    Having said that, AC's GameCameras still allow you to define a DOF value per-camera, with an option to have the DOF match the camera's target.  This DOF value can then be transferred to your MainCamera's DOF effect with a custom script - all you need to do is set the focal distance to the active GameCamera's focalDistance in an Update function:

    AC.KickStarter.mainCamera.attachedCamera.focalDistance;
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.