For my first real Unity project I’m trying to make a 2D point-and-click game similar to Curse of Monkey Island.
I’ve got some really basic movement but I’m wondering how I can make the player bigger the closer they get to the bottom of the screen? This is to give the illusion of depth.
I also want to use Edge Colliders to limit were the player can go. Any idea how I’d implement that?
I have got some past game dev and programming experience but I’m completely new to Unity and C#…
It would also be possible to create a nav-mesh, set the camera to orthographic, and angle it downward toward the nav-mesh. (for path-finding and collision detection) As to the character scaling, that is relatively easy. Just find an axis you can key to, and cook up a quickie script that has two float values, one for minimum scale and one for maximum scale. Then have the scaling of your character get updated based on its relative distance to the camera and the limits you defined in your script.
The NavMesh system is not rigged up by default to support 2D, but that doesn’t mean that it can’t be used. The sticking point some people run into is simply the default position of the camera for 2D games. NavMesh is designed to treat the scene as the Y axis being the “top-down” view, while the default 2D camera in Unity treats the Z axis as the “top-down” perspective. But this is just an arbitrary designation. There’s nothing stopping you from simply grabbing the 2D camera in the Unity scene and re-positioning it and rotating it to look down on a NavMesh. At that point you can set up your scene to bake a NavMesh with a pretty much 1 to 1 2D perspective. Ditto for any Sprites you create. Even if their default orientation has them facing the wrong way, that is easily addressed.
And that’s just one basic example. You could also just create a quickie class that translates NavMesh 3D coordinates to 2D coordinates, and then link your 2D sprites to 3D Empty objects that move around the NavMesh. That approach would work just fine, and wouldn’t require changing up the scene at all.