I’ve already optimised these sprites (and attached door/signage textures) (from a single large Sprite Template BitmapData) such that it creates a number for the 1st pixel in every row (this color will tell the engine to skip immediately to the pixel in the row which is known to be non-transparent…and it starts scanning through all the colored pixels until it hits the blue “0x0000FF” region, and this causes it to break outta the “while loop column scanning operation” to carry on to the next row where the process is repeated). If it checks that the first and last pixel in the row is blocked by a wall, than it’s assumed the sprite is fully concealed (though for my engine, it’s may not exaclty be true all the time because my walls can be of any height and even the top of the buildings can be walked on…but for now such features must not be overused as it will compromise speed).
I basically have up to 12 unique angle images for each vehicile in my raycasted metropolis. THe thing is i can’t get the car vehicle sprites to view properly based off an angle. I don’t have any good mathematical ideas to get it to view realistically. After all, the greater the arc from the player, wouldn’t that affect the angle in relation to the camera plane? Can you help give some example code in regards to tryring to find the angle of the vehicle in relation to the player’s camera view?