Hi all, I followed a tutorial on how to use a texture render, raw image and canvas to make the game appear to be very low resolution like a ps1 game. I got this working just fine but realised the mouse over hotspots no longer work. I'm using a first person perspective. If I set hotspot settings to near player, they work, but it's not practical.
Whenever I find a solution online, it's a block of code with assumptions of knowing where to put it!
I've wasted an entire day trying to work this out, argh!
Comments
Welcome to the community, @BecauseBecause.
Apologies for your frustration. I'll need to know more detail about the method you've relied on - can you share the tutorial you've followed?
The main thing to look out for is that the AC MainCamera is still considered the "main" Camera in the scene. If you need to rely on a different camera, you can set this through script - but I'll need to see your setup to know if this is necessary. Can you share screenshots of your scene setup, including the camera(s) involved, the texture / UI and your Hierarchy?
No apologies necessary, this is self inflicted pain haha. I love AC, it was time to move from AGS after all these years!
This video is exactly what I did:
here's a link to all the screenshots I thought would help:
https://imgur.com/a/rnTP9l8
So yeah, I figured when I applied this and it says "Display 1 No Cameras rendering" that was probably something to do with why I could no longer interact with anything using mouse cursor. (With a locked cursor as per your first person video tutorial)
Thanks!
PS - the display 1 error isn't shown in my screenshots because I unticked that warning
Thanks, I'll give this a look and see if it occurs on my end as well.
Can you share a shot of your Settings Manager as well?
Appreciate it! In fact, just for feedback, it was reassuring when deciding whether to purchase AC, to see it's creator was happy to help people with their AC problems on this forum.
https://imgur.com/a/LANznbj
I spliced the settings manager into one image to make it easier for you to look at.
thank you for any help you can give, im no coder but I'd really love to keep this low resolution effect without having to actually display the game as low resolution, you understand.
Recreated, here's how to fix it:
Hi, I did everything you said except I don't know if I'm doing the depth value correctly. As far as I can see, depth value is a HDURP thing? I can find priority, is that the same thing? I try setting that and in the game preview window it is pixelated, but as soon as I start the game the camera looks high resolution. Any idea why it would be doing that?
Could the camera attached to the player be a problem, am I supposed to have that there? If I disable the MainCamera it shows a black screen so it is using it.
https://imgur.com/a/rSIutEO
Here's some screenshots of my setup. ignore the warning about FirstPersonCamera, I was seeing what happened if I deleted it. Not good, blank screen!
PS - I really appreciate you took the time to recreate my problem!
Don't remove the FirstPerson camera - it's used as a reference for the MainCamera's position and orientation. It won't perform any rendering itself at runtime.
What render pipeline are you using - HDRP or URP? I was using the built-in, actually. With yours, it may be a case of instead adding the UI Camera to the MainCamera's "Camera stacking" list.
I want to keep the options open for this game to be on consoles ported by a publisher but it sounds like built-in wouldn't support that? That's why i went with URP.
I'm just going to cry in the corner now. 😭
Okay, I decided to try and get around the limitations of using trigger hotspots when near, with the original texture render method. The advantage to this is having objects highlight themselves when nearby. I also replaced the sphere collider with a box collider just to narrow the width of it. I couldn't have the hotspot label text hover over the objects, the text would hang around the bottom of the screen or right at the top, and not behave correctly - I assume that's another issues with how mouse over doesn't work. So I've fixed it to the centre. Can you foresee any future issues with going down this road? The pause menu seems to work although I haven't tried using inventory items yet - I imagine I could just streamline it so items work by just checking if the player has it in their possesion rather than having to select an inventory item and click on something in the game world, right?
Here's a video of the project in action:
Cheers, and have a merry Christmas!
What's the Sphere Collider you mention - the one used by the Hotspot Detector?
Ultimately, the solution / approach isn't something that needs to be set in stone before the rest of the game can be developed. So long as the properties of your scene objects (Hotspot colliders etc) aren't impacted by the technique, it could even be the last thing implemented before release.
In my testing, the issue was that Unity somehow thought that the camera was facing a different direction, which caused Hotspots to not be selected at the right time. It would be best to find a proper solution to the original issue - I'll see if I can find a URP-specific workaround.
You're right, I could change it all back and the hotspots would all still work correctly! That's a relief.
Yeah, the one used by the hotspot detector. i just unticked the sphere collider rather than delete it, just incase.
Hmm that would explain why the hotspot labels would be flying around the bottom of the screen!
Okay, I'll check back here to see if you come up with anything, thank you.
Got things working in URP with essentially the same workflow as I described earlier.
It is a case of assigning the UI Camera in the MainCamera's Camera stack - the UI Camera just needs to have its "Render type" set to "Overlay".
I tried as you said and I STILL can't get it to work, I sure wish i could inspect your project.. HOWEVER!! I fixed the text placement problem by setting the FirstPersonCamera's Camera to use the render texture as an output, set the priority to 1 and Main Camera's priority to 0. For whatever reason the hotspot text is now accurately placed on the hotspot. If I have it set how I did originally, basically the other way around, the text is completely off. So strange.
Well this works for me, so I'll stick to this method!