Skip to main content
gamedev.net
🔒 Locked

Calculating reflected camera

Started by Coluna Oct 31, 2004 at 10:50 PM 0 replies 350+ views
Original Post
Coluna
Coluna
Hi; I wanna know how to get a new modelview matrix, reflected in a given plane (normal+dist)...I know u can reflect using scale (1 -1 1), but i want not only for water surfaces, and using scale there r some problems like having to change your winding...ah, im using opengl, but it doesnt matter at all... thanks
_the_phantom_
_the_phantom_
Planar Reflections gives you the formula you'll need to reflect around an given plane.

and yes, you need to either reverse the winding of the objects or invert the culling (front face instead of backface culling).

You should be able to worth the code out from that formula, as you say you'll need a normal to work from to get the orintation of the plane (so any 3 points on teh plane will ofcourse do for that job)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.