Posted By: Rackscha
reflecting a laser from wall - 09/28/12 18:47
Hi,
seems i havent understood something correctly.
Ok, imagine we have a laser for a weapon i want to reflect from walls.
first, i calculate start/endvec for my laser.
do the trace
if i hit something:
i substract start from endvec(to get the direction, saved in BVec)
vec_to_angle for hit.nx
and rotate my BVec by the angle, add hit.x and trace again from hit.x to BVec.
Okay but the reflection seems to be wrong(as a laser hiting a surface isnt reflected straight back)
mh, maybe someone has an idea?
Greetings
Rackscha
seems i havent understood something correctly.
Ok, imagine we have a laser for a weapon i want to reflect from walls.
first, i calculate start/endvec for my laser.
do the trace
if i hit something:
i substract start from endvec(to get the direction, saved in BVec)
vec_to_angle for hit.nx
and rotate my BVec by the angle, add hit.x and trace again from hit.x to BVec.
Okay but the reflection seems to be wrong(as a laser hiting a surface isnt reflected straight back)
mh, maybe someone has an idea?
Greetings
Rackscha