Problem doing the Quick Start in 3D isometric project

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
TomHate
Posts: 4
Joined: Fri Oct 07, 2022 8:28 am

Problem doing the Quick Start in 3D isometric project

Post by TomHate »

Hello guys,

Just got the asset from the humble bundle and tried to implement the quick start tutorial in a 3D isometric projet that I had.

My problem is with the distance between the selector and the usable. I try to adjust the "Max Selection Distance" so that I can click on the usable when the player is near it. It works well when I'm in front of the Usable, if I go too far, I can't click it :

IN ALL THE SCREENSHOTS, MY MOUSE IS ON THE COP (WHICH IS MY USABLE), THE CURSOR IS JUST INVISIBLE.
Capture d’écran 2022-10-07 143830.png
Capture d’écran 2022-10-07 143830.png (25.24 KiB) Viewed 359 times
Capture d’écran 2022-10-07 143903.png
Capture d’écran 2022-10-07 143903.png (24.68 KiB) Viewed 359 times
But when I'm behind the usable, even when I'm far, I can click on the usable :
Capture d’écran 2022-10-07 143946.png
Capture d’écran 2022-10-07 143946.png (28.78 KiB) Viewed 359 times
Capture d’écran 2022-10-07 144018.png
Capture d’écran 2022-10-07 144018.png (37.51 KiB) Viewed 359 times
This is my camera settings (put in orthographic mode) :
Capture d’écran 2022-10-07 144620.png
Capture d’écran 2022-10-07 144620.png (41.25 KiB) Viewed 359 times
And this is my Selector and Usable settings :
Capture d’écran 2022-10-07 144832.png
Capture d’écran 2022-10-07 144832.png (54.72 KiB) Viewed 359 times
Capture d’écran 2022-10-07 144904.png
Capture d’écran 2022-10-07 144904.png (26.44 KiB) Viewed 359 times
I tried to put the "Distance From" property to "Camera" in my selector but it doesn't seem to work, so I put on "Game Object". I tried to change the "Max Use Distance" property in the Usable component but it doesn't resolve the problem either. I also tried to change the "Run Raycasts" property in my selector to "In 2D" since I saw that in 2D, the camera has to be orthographic (and my camera is orthographic) but it doesn't work at all, I can't click on the usable, no matter the value in "Max Selection Distance".

Thanks a lot for the help guys !
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem doing the Quick Start in 3D isometric project

Post by Tony Li »

Hi,

I see you wrote "...it doesn't work at all, I can't click on the usable, no matter the value in "Max Selection Distance". but what if you try a really high number like 9999 for the Selector's Max Selection Distance and the Usable's Max Use Distance?

Since your GameObjects are 3D (and presumably have 3D colliders), please keep Run Raycasts set to "In 3D".
TomHate
Posts: 4
Joined: Fri Oct 07, 2022 8:28 am

Re: Problem doing the Quick Start in 3D isometric project

Post by TomHate »

Tony Li wrote: Fri Oct 07, 2022 9:03 am I see you wrote "...it doesn't work at all, I can't click on the usable, no matter the value in "Max Selection Distance". but what if you try a really high number like 9999 for the Selector's Max Selection Distance and the Usable's Max Use Distance?
Yes I tried with really high values for both the selector and the usable, and it's not working at all.
Tony Li wrote: Fri Oct 07, 2022 9:03 am Since your GameObjects are 3D (and presumably have 3D colliders), please keep Run Raycasts set to "In 3D".
Yes my gameObjects are 3D with 3D colliders.
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem doing the Quick Start in 3D isometric project

Post by Tony Li »

What GameObject is the Selector on?

If it's not on the player GameObject (the white capsule), can you assign the player GameObject to the Selector's Actor Transform and give it a try?
TomHate
Posts: 4
Joined: Fri Oct 07, 2022 8:28 am

Re: Problem doing the Quick Start in 3D isometric project

Post by TomHate »

Tony Li wrote: Fri Oct 07, 2022 9:37 am What GameObject is the Selector on?
The selector is on the white capsule (the player). I tried to add the player to the "Actor Transform" property but the problem is still there.
I think the problem may come from the camera. Changing the values of the "Clipping planes" property of the camera change the area in which I can click on the Usable (The cop). For example when I put a very low value to "Near" Clipping Planes (-9999 for example), I can't click on the Usable anymore.
When I put the default values for the "Clipping Planes", there seems to be this red area where I can interact with the usable :
Capture d’écran 2022-10-07 161130.png
Capture d’écran 2022-10-07 161130.png (242.8 KiB) Viewed 353 times
Maybe the way I deal with camera is wrong ? How does Dialogue System works with isometric camera ?

Thanks for the answers !
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem doing the Quick Start in 3D isometric project

Post by Tony Li »

I'll investigate this. It sounds like an issue with doing a camera raycast using that orthographic camera.
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem doing the Quick Start in 3D isometric project

Post by Tony Li »

Hi,

Would you please compare your Selector and Camera setup to this test scene?

DS_TestIsometric3DSelector_2022-10-07.unitypackage

It's a copy of DemoScene1 in which I changed the camera to orthographic projection. I also got rid of some walls, so don't accidentally walk off the edge of the world. :-)

If that doesn't help, can you post reproduction steps or email a reproduction project to tony (at) pixelcrushers.com?
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem doing the Quick Start in 3D isometric project

Post by Tony Li »

Thanks for sending the repro project!

Your Player GameObject doesn't move; the PlayerModel child GameObject moves. So set up your Selector with these settings:
  • Select At: Mouse Position
  • Layer Mask: Default (remember to include all layers that you want to detect, if you add new ones)
  • Distance From: Actor Transform
  • Max Selection Distance: 9999
  • Run Raycasts: In 3D
    ...
  • Actor Transform: PlayerModel
TomHate
Posts: 4
Joined: Fri Oct 07, 2022 8:28 am

Re: Problem doing the Quick Start in 3D isometric project

Post by TomHate »

Ok now it's working perfectly. I just have to change the "Max Use Distance" on the Usable to adjust the clickable area, and set up the selector as you said.

Thanks a lot for the help !
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem doing the Quick Start in 3D isometric project

Post by Tony Li »

Glad to help!
Post Reply