![]() That'll be a problem for future me.įuture me here! Past me was a jerk! I added collisions for the lasers so that you could shoot the asteroids. I still have some issues with the angle in which it is drawn and I'm not sure if I'm firing it in the wrong direction or drawing it wrong. It wasn't a challenge I couldn't overcome though: after removing texture sampling from the shader, the color returned, then I disabled backface culling for the laser and so the disappearing disappeared. Obviously, it didn't and all I got was a black cross that was invisible half of the time. Now, between shader code, a new model and the usual rotation issues it would be a surprise to see it actually work. Pew! Lasers! They're awesome! I added a simple cross of two planes and stretched them out to make a beam, then added a shader to distort them a bit. Kind of funny, really, since I already had a session of debugging why things moved around when I rotated them. ![]() ![]() After some debugging it started to dawn on me that I had forgotten yet another rule of 3D transformations: scale first, then rotate, then move. I added collision and it works great, except the collisions appear in the wrong places, making you collide with thin air and pass through the asteroids.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |