Contents tagged with Unity3d

  • Missing Transform Gizmo for 2D Sprites in Unity 4.3

    Tags: Unity3d, 4.3, Bug, Hack

    I ran into what I believe is a bug in version 4.3 of Unity. It looks like 2D sprites have a tendency to lose their transform gizmo. Due to my slow internet I haven't downloaded the latest release so I have not determined if this has been fixed yet (v 4.3.3 is the latest as of writing - if this has been fixed please let me know by leaving a comment below) but I didn't see anything in the release notes. In the meantime, I have a temporary work around.

  • 2D Game Objects Disappearing with Custom Camera Script in Unity 4.3

    Tags: Unity3d, 2D, Camera

    I was working on my tentatively named "Unity 2D Platformer Starter Kit" (more on this later) which I'll probably use in many projects and game jams in the future, and while implementing a basic camera script a ran into a strange issue. I was making it so that the camera automatically follows the player when the player moves. Turns out I fell into a confusing yet obviously silly pitfall where when the camera script tracked the player, all the game objects disappeared. The good news is that it was a very simple fix once I made sense of the issue.

  • Pong - a complete Unity 4.3 2D project

    Tags: Unity3d, 2D, Pong, Playable Game

    So after a few hours of dabbling I managed to figure out how the 2D tools work and have completed my first project with them - Pong!

  • 2D Raycasting in Unity 4.3

    Tags: Unity3d, 4.3, 2D, ray, raycasting, collision detection

    Unity 4.3 released today and I was super excited for the brand new 2D tools that came with it. I very quickly dug in and began playing with the built in physics, which while work, produce results that I particularly wasn't fond of. Being a programmer with some understanding of how these things might work, I figured it would be easier to roll my own collision detection using raycasting rather than fight the system provided to me. There are lots of examples out there on how to do raycasting with the 3D components of Unity but I just couldn't get those examples to work using the 2D colliders. As it turns out there were new physics objects to work with and once I got it all figured out it worked great. I've written this post in order to help others learning the ropes with the Unity 2D tools in case someone else runs into the same issues I did.