Breaking and Raycasting!

So I’m trying to make progress on my level selector and now I need the user input to select the various worlds to propagate the event to pick a level. So I found various examples of how to transfer the camera point to a 3d Ray, then to do the Raycasting in which it should return whether the ray collided with anything. However, I’m getting nada… and as I’m typing this I just realized I don’t have a collider on the target object.

Yup that was totally it!!! Wasted a good two hours mucking around with it. Maybe if I started to blog this earlier I would have figured it out earlier.

I also managed to break my backdrop as I was trying to optimize the game loading time. 15-17 seconds is just too much. I modified all the textures to explicitly be 16bit and next I’m going to try to find a lower poly model to use for the first boss, since the model itself eats up a meg of resources.

Until the next crab time!

Leave a Reply