Invector demo scene and camera problems
-
- Posts: 29
- Joined: Fri Jul 17, 2020 9:19 am
Invector demo scene and camera problems
Hi there (and hi again Tony! If you are still around. Been a long time),
I am experiencing several problems with the invector integration. I am running Unity 2021.3.11f1 and Invector Version 2.6.2a (current). I am also using FSM AI Template, but that is no concern for now. First, I installed Invector, then Dialogue system for Unity, followed by unpacking both Invector packages in Dialogue System for Unity (as instructed on https://www.pixelcrushers.com/dialogue_ ... ector.html)
Upon opening the demo scene (Pixel Crushers > Dialogue system > Third Party Support > Invector Support > Example > Dialogue System Invector Locomotion scene), I get several errors.
1) Two prefabs are missing in gameobject UI. A dummy prefab is also missing, but a dummy is generated by the scene when it is missing. So total of three missing prefabs. I get one log entry: Prefab instance problem: Missing Prefab with guid: 4de1fc8f6a3882542ac75fec242baf9e . See screenshot missingprefabs.png of Unity hierarchy.
2) You can still interact with private Hart. If you do, then your camera goes off tilt during the conversation (more noticable when you move your mouse up and down/away from center) and this remains so after you leave the conversation. See second and third screenshot (tiltedcamera1.png and tiltedcamera2.png).
Edit: The purple material on private Hart is because this is a URP project and I did not convert the material to URP yet.
Does someone have a solution for this?
I am experiencing several problems with the invector integration. I am running Unity 2021.3.11f1 and Invector Version 2.6.2a (current). I am also using FSM AI Template, but that is no concern for now. First, I installed Invector, then Dialogue system for Unity, followed by unpacking both Invector packages in Dialogue System for Unity (as instructed on https://www.pixelcrushers.com/dialogue_ ... ector.html)
Upon opening the demo scene (Pixel Crushers > Dialogue system > Third Party Support > Invector Support > Example > Dialogue System Invector Locomotion scene), I get several errors.
1) Two prefabs are missing in gameobject UI. A dummy prefab is also missing, but a dummy is generated by the scene when it is missing. So total of three missing prefabs. I get one log entry: Prefab instance problem: Missing Prefab with guid: 4de1fc8f6a3882542ac75fec242baf9e . See screenshot missingprefabs.png of Unity hierarchy.
2) You can still interact with private Hart. If you do, then your camera goes off tilt during the conversation (more noticable when you move your mouse up and down/away from center) and this remains so after you leave the conversation. See second and third screenshot (tiltedcamera1.png and tiltedcamera2.png).
Edit: The purple material on private Hart is because this is a URP project and I did not convert the material to URP yet.
Does someone have a solution for this?
- Attachments
-
- tiltedcamera2.PNG (709.66 KiB) Viewed 2149 times
-
- tiltedcamera1.PNG (444.99 KiB) Viewed 2149 times
-
- missingprefabs.PNG (32.31 KiB) Viewed 2149 times
Re: Invector demo scene and camera problems
Hi,
This is fine. The example scene was copied from an earlier version of Invector's Basic Locomotion controller. In a later version, they removed whatever that prefab was. But it's not used by the example scene, so it's nothing to worry about. If you're going to base your own Invector setup off of an existing scene, I recommend using one of Invector's current example scenes. Then just drop in the Dialogue System stuff as per the integration instructions.alsoknownas-stefan wrote: ↑Thu Oct 20, 2022 6:03 pm1) Two prefabs are missing in gameobject UI. A dummy prefab is also missing, but a dummy is generated by the scene when it is missing. So total of three missing prefabs. I get one log entry: Prefab instance problem: Missing Prefab with guid: 4de1fc8f6a3882542ac75fec242baf9e . See screenshot missingprefabs.png of Unity hierarchy.
Does the included example scene work correctly? (Dialogue System Invector Locomotion) If it does, and if your own scene doesn't, then please compare the configuration of the player or review the integration instructions. If you get completely stuck, feel free to send a reproduction project to tony (at) pixelcrushers.com. I'll be happy to take a look.alsoknownas-stefan wrote: ↑Thu Oct 20, 2022 6:03 pm2) You can still interact with private Hart. If you do, then your camera goes off tilt during the conversation (more noticable when you move your mouse up and down/away from center) and this remains so after you leave the conversation. See second and third screenshot (tiltedcamera1.png and tiltedcamera2.png).
-
- Posts: 29
- Joined: Fri Jul 17, 2020 9:19 am
Re: Invector demo scene and camera problems
Hi Tony,
Thanks for your reply. I have found the problem. It seems that Control Cursor State on the Input Device Manager component on the Dialogue Manager gameobject was still ticked in the demo scene (contrary to the integration instructions). More importantly, I forgot to set my vController gameobject in the Conversation Actor slot on the Dialogue System Trigger component (under Start Conversation) on the Private Hart gameobject.
So, it works, but this also raises questions in terms of customization.
1) I noticed that the camera is completely locked when having a conversation and is quite close to Private Hart. I cannot find any parameters to set the distance or any xyz of the camera in relation to private Hart. This is problematic for several reasons, one being sitting characters (see screenshot, where the conversant is sitting down and is even below the dialogue window). Can I set these parameters somewhere?
EDIT: I think this is tied to Camera(Closeup); {{default}} in the conversation itself. I am going to look at https://www.pixelcrushers.com/dialogue_ ... ences.html and experiment a bit.
2) The player is locked as well, as in cannot move around during conversation. Say that I want the invector player to be able to move around (so that a player can choose to leave a collider, ending the conversation) when having a conversation. How do I get about this? Somewhere, there is probably a bool that disables the invector Third Person Controller, so that it cannot move around, but I cannot find it. Changing 'Face conversant' and 'Face Y Axis only' on the Dialogue System Invector Bridge component on the player gameobject does not seem to have an effect.
3) Say that I want to give the player the functionality to tilt/pan the camera, also zoom (using the 'use zoom' option on the invector camera, e.g. to look at details of the face of Private Hart) when having a conversation. How would I go about this?
4) I was thinking about adding a second conversation camera to switch to during conversations and back. Does Dialogue System for Unity provide a functionality for switching camera's mid-conversation?
Thanks for your reply. I have found the problem. It seems that Control Cursor State on the Input Device Manager component on the Dialogue Manager gameobject was still ticked in the demo scene (contrary to the integration instructions). More importantly, I forgot to set my vController gameobject in the Conversation Actor slot on the Dialogue System Trigger component (under Start Conversation) on the Private Hart gameobject.
So, it works, but this also raises questions in terms of customization.
1) I noticed that the camera is completely locked when having a conversation and is quite close to Private Hart. I cannot find any parameters to set the distance or any xyz of the camera in relation to private Hart. This is problematic for several reasons, one being sitting characters (see screenshot, where the conversant is sitting down and is even below the dialogue window). Can I set these parameters somewhere?
EDIT: I think this is tied to Camera(Closeup); {{default}} in the conversation itself. I am going to look at https://www.pixelcrushers.com/dialogue_ ... ences.html and experiment a bit.
2) The player is locked as well, as in cannot move around during conversation. Say that I want the invector player to be able to move around (so that a player can choose to leave a collider, ending the conversation) when having a conversation. How do I get about this? Somewhere, there is probably a bool that disables the invector Third Person Controller, so that it cannot move around, but I cannot find it. Changing 'Face conversant' and 'Face Y Axis only' on the Dialogue System Invector Bridge component on the player gameobject does not seem to have an effect.
3) Say that I want to give the player the functionality to tilt/pan the camera, also zoom (using the 'use zoom' option on the invector camera, e.g. to look at details of the face of Private Hart) when having a conversation. How would I go about this?
4) I was thinking about adding a second conversation camera to switch to during conversations and back. Does Dialogue System for Unity provide a functionality for switching camera's mid-conversation?
- Attachments
-
- Capture.PNG (713.31 KiB) Viewed 2135 times
Re: Invector demo scene and camera problems
Hi,
The DialogueSystemInvectorBridge component freezes Invector movement and camera controls during conversations. Here's a updated version that has a checkbox you can untick to turn off that feature:
DS_InvectorPatch_2022-10-21.unitypackage
If you untick the Pause Invector During Conversation checkbox, it won't freeze movement and camera. If you want to freeze it for a specific conversation, you can manually call PauseCharacter() and UnpauseCharacter().
You're correct that the example conversation uses a Camera(Closeup) to do a closeup of the NPC.
If you want to use a separate camera for conversations, assign it (GameObject or prefab) to the Dialogue Manager's Display Settings > Camera & Cutscene Settings > Sequencer Camera field. This is a fairly common thing to do, which allows you to apply different post process effects to the sequencer camera such as a stronger depth of field effect.
The DialogueSystemInvectorBridge component freezes Invector movement and camera controls during conversations. Here's a updated version that has a checkbox you can untick to turn off that feature:
DS_InvectorPatch_2022-10-21.unitypackage
If you untick the Pause Invector During Conversation checkbox, it won't freeze movement and camera. If you want to freeze it for a specific conversation, you can manually call PauseCharacter() and UnpauseCharacter().
You're correct that the example conversation uses a Camera(Closeup) to do a closeup of the NPC.
If you want to use a separate camera for conversations, assign it (GameObject or prefab) to the Dialogue Manager's Display Settings > Camera & Cutscene Settings > Sequencer Camera field. This is a fairly common thing to do, which allows you to apply different post process effects to the sequencer camera such as a stronger depth of field effect.
-
- Posts: 29
- Joined: Fri Jul 17, 2020 9:19 am
Re: Invector demo scene and camera problems
Hi Tony,
You never cease to amaze me. I see that InvectorPlayerUtility.cs contains a lot of the parameters I am looking for. Your patch and its logic makes it easy for me to implement my ideas.
You never cease to amaze me. I see that InvectorPlayerUtility.cs contains a lot of the parameters I am looking for. Your patch and its logic makes it easy for me to implement my ideas.
Last edited by alsoknownas-stefan on Fri Oct 21, 2022 12:19 pm, edited 3 times in total.
Re: Invector demo scene and camera problems
Glad to help!
-
- Posts: 29
- Joined: Fri Jul 17, 2020 9:19 am
Re: Invector demo scene and camera problems
One question though:
How do I switch to the alternative camera? I put in an extra cam in the scene, gave it the MainCamera tag, put it in the Sequencer Camera slot on the Dialogue System Controller (under Camera & Cutscene Settings). But I do not know how to activate it during the conversation...
And how do I switch back to my default camera after switching to the alternative cam on the next dialogue line?
I would expect that I can define which camera to be used in the sequence lua script on the dialogue line (e.g. CloseupDialogueCam2(Closeup); {{default}} and Camera1(Down); {{default}} on the next line), but it does not seem to work that way. See screenshots for cams in scene and for the dialogue controller settings.
There is no sequence trigger script anymore in the Dialogue system for Unity package, so the way described in the tutorial Dialogue System for Unity - Camera Angles on Youtube seems out of date:
I also followed the steps in the youtube video Dialogue System for Unity 2.x - Cutscene Sequences - Part 2: Camera Control, but it seems that no switching happens to the second cam. Enabling/disabling the second cam (CloseUpDialogueCam) has no effect and nor does tagging it with MainCamera. I also made a conversation event where my main camera (vThirdPersonCamera) gets .setactive set to false On Conversation Start in the Dialogue System Events component and ,setactive set to true on the On Conversation End event. ( )
EDIT: what seems to happen is that the main camera (vThirdPersonCamera) indeed gets deactivated. My CloseUpDialogueCam gets activated. BUT! The CloseUpDialogueCam assumes the position of where the main camera would be (if I had left it activated), even though I pointed the CloseUpDialogueCam at the feet of the conversant. My sequence on the dialogue line is the following: Camera(Down); {{default}} . I think this is not correct, but I do not know what it should be.
Help?
How do I switch to the alternative camera? I put in an extra cam in the scene, gave it the MainCamera tag, put it in the Sequencer Camera slot on the Dialogue System Controller (under Camera & Cutscene Settings). But I do not know how to activate it during the conversation...
And how do I switch back to my default camera after switching to the alternative cam on the next dialogue line?
I would expect that I can define which camera to be used in the sequence lua script on the dialogue line (e.g. CloseupDialogueCam2(Closeup); {{default}} and Camera1(Down); {{default}} on the next line), but it does not seem to work that way. See screenshots for cams in scene and for the dialogue controller settings.
There is no sequence trigger script anymore in the Dialogue system for Unity package, so the way described in the tutorial Dialogue System for Unity - Camera Angles on Youtube seems out of date:
I also followed the steps in the youtube video Dialogue System for Unity 2.x - Cutscene Sequences - Part 2: Camera Control, but it seems that no switching happens to the second cam. Enabling/disabling the second cam (CloseUpDialogueCam) has no effect and nor does tagging it with MainCamera. I also made a conversation event where my main camera (vThirdPersonCamera) gets .setactive set to false On Conversation Start in the Dialogue System Events component and ,setactive set to true on the On Conversation End event. ( )
EDIT: what seems to happen is that the main camera (vThirdPersonCamera) indeed gets deactivated. My CloseUpDialogueCam gets activated. BUT! The CloseUpDialogueCam assumes the position of where the main camera would be (if I had left it activated), even though I pointed the CloseUpDialogueCam at the feet of the conversant. My sequence on the dialogue line is the following: Camera(Down); {{default}} . I think this is not correct, but I do not know what it should be.
Help?
- Attachments
-
- dialoguecontroller.PNG (47.66 KiB) Viewed 2113 times
-
- cams.PNG (30.12 KiB) Viewed 2113 times
Last edited by alsoknownas-stefan on Fri Oct 21, 2022 1:19 pm, edited 1 time in total.
Re: Invector demo scene and camera problems
Hi,
Make sure your main Invector gameplay camera is tagged MainCamera.
Also set your sequencer camera's Depth to a higher value than the Invector camera for good measure.
When you assign a sequencer camera to the Dialogue Manager's Camera & Cutscene Settings > Sequencer Camera, the Dialogue System will keep it inactive until a conversation starts. When the conversation starts, it will deactivate the Invector camera and activate the sequencer camera. When the conversation ends, it will deactivate the sequencer camera and activate the Invector camera.
Side note 1: You can switch to a different sequencer camera using the SwitchCamera() sequencer command.
Side note 2: Dialogue System Trigger is a superset of Sequencer Trigger, Conversation Trigger, etc. To set up a "Sequence Trigger" now, use a Dialogue System Trigger and select Add Action > Play Sequence.
Make sure your main Invector gameplay camera is tagged MainCamera.
Also set your sequencer camera's Depth to a higher value than the Invector camera for good measure.
When you assign a sequencer camera to the Dialogue Manager's Camera & Cutscene Settings > Sequencer Camera, the Dialogue System will keep it inactive until a conversation starts. When the conversation starts, it will deactivate the Invector camera and activate the sequencer camera. When the conversation ends, it will deactivate the sequencer camera and activate the Invector camera.
Side note 1: You can switch to a different sequencer camera using the SwitchCamera() sequencer command.
Side note 2: Dialogue System Trigger is a superset of Sequencer Trigger, Conversation Trigger, etc. To set up a "Sequence Trigger" now, use a Dialogue System Trigger and select Add Action > Play Sequence.
-
- Posts: 29
- Joined: Fri Jul 17, 2020 9:19 am
Re: Invector demo scene and camera problems
Hi Tony,
Yep, that fixed it. Thank you once more!
If anybody else has this problem:
Only my Invector camera (which has the gameobject name MainCamera) is tagged MainCamera. My CloseUpDialogueCam is untagged and deactivated. The first dialogue line has the sequence SwitchCamera(CloseUpDialogueCam); {{default}} and thus uses my special post processing alternative camera that I want to use for close ups. The second dialogue line has the sequence SwitchCamera(MainCamera) making it switch to my MainCamera again.
Yep, that fixed it. Thank you once more!
If anybody else has this problem:
Only my Invector camera (which has the gameobject name MainCamera) is tagged MainCamera. My CloseUpDialogueCam is untagged and deactivated. The first dialogue line has the sequence SwitchCamera(CloseUpDialogueCam); {{default}} and thus uses my special post processing alternative camera that I want to use for close ups. The second dialogue line has the sequence SwitchCamera(MainCamera) making it switch to my MainCamera again.
Re: Invector demo scene and camera problems
Happy to help! I'm glad you got it working the way you want.