Problem doing the Quick Start in 3D isometric project
Problem doing the Quick Start in 3D isometric project
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.
But when I'm behind the usable, even when I'm far, I can click on the usable :
This is my camera settings (put in orthographic mode) :
And this is my Selector and Usable settings :
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 !
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.
But when I'm behind the usable, even when I'm far, I can click on the usable :
This is my camera settings (put in orthographic mode) :
And this is my Selector and Usable settings :
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 !
Re: Problem doing the Quick Start in 3D isometric project
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".
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".
Re: Problem doing the Quick Start in 3D isometric project
Yes I tried with really high values for both the selector and the usable, and it's not working at all.
Yes my gameObjects are 3D with 3D colliders.
Re: Problem doing the Quick Start in 3D isometric project
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?
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?
Re: Problem doing the Quick Start in 3D isometric project
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 :
Maybe the way I deal with camera is wrong ? How does Dialogue System works with isometric camera ?
Thanks for the answers !
Re: Problem doing the Quick Start in 3D isometric project
I'll investigate this. It sounds like an issue with doing a camera raycast using that orthographic camera.
Re: Problem doing the Quick Start in 3D isometric project
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?
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?
Re: Problem doing the Quick Start in 3D isometric project
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:
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
Re: Problem doing the Quick Start in 3D isometric project
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 !
Thanks a lot for the help !