Flip entity on one axis

BlitzMax Forums/MiniB3D Module/Flip entity on one axis

icebeararmy(Posted May) [#1]
Hey :)

I wonder how you could flip an entity on one axis the correct way. Currently i'm doing this:
ScaleMesh entity,-1,0,0
FlipMesh entity

This kinda works, but the lighting of the entity is totally wrong. It looks like the light comes from the wrong side. "UpdateNormals" can fix that, but then it turns the hard edges of my entity into smooth edges.

EDIT: I found this: http://www.blitzbasic.com/codearcs/codearcs.php?code=2176
I just had to recalculate the normals the right way. :/