
Sprites clipping into each other
I got the sprites to draw themselves in reverse order, from the farthest to the nearest, and now they disappear when behind objects but when 2 sprites are very close together and I rotate the camera, as the rotate in the opposite direction they clip through each other and one of them ends up obscuring the other one because it''s drawn before the one in back of it.
This is how I find everything''s distance from the camera in case that helps at all. The squared represents multiplying the stuff before it by itself, it''s not an actual c command.
(Spritex-CamPosx)squared+(Spritez-CamPosz)squared+(Spritez-CamPosz)squared
All help is appreciated a lot.
By the way I''m kind of new at this, been using C for 4 days. Used to be using FutureBASIC 2.

This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement