Collaboration? With raycasting?

I was wondering if someone/s could help me with a ray casting project I was wondering if in raycasting I could make a mirror

what do you mean by "making a mirror"?

A mirror where rays bounce off of it and then when they touch anything else but the mirror they do the same thing they do when they touch a wall

So, raytracing?

Yea should be easy-ish

You would have to use ray marching instead of the ray length block however, but otherwise you should just be able to bounce the ray object in the oppisate direction using advanced math

I’m back

Yeah kinda

Iirc this requires calculus to do as you would basically just be remaking “if on edge bounce” but for any spritr

Well, not calculus per se, but it will need trig.

(Also, I don't know much slang. What does "lirc" mean?)

Well

What I was thinking was that we would get a ray/s and the angle the ray/s had hit from and we would kinda 0 - sin(angle) * 60 I was thinking so we would reverse the angle using 0 - and then the angle would be sin of angle you know what I mean right?

Could you start with a raycasting or raytracing project and I will implement the equation and I need you to make a detection for a mirror so then I could get the angle of the ray and use my equation and and make another ray that points in the direction specified by the angle specified by the equation and then get the color of the thing the ray hit and put it on the mirror this is what I’m gonna do you make the mirror project ok?

If I recall correctly

Maybe a starting point (by @ s_federici)

it's iirc, not Lirc (why do ls and Is look the same??) and heres a quote from dictionary.com:

Oh, I didn't know that was called raytracing.

isnt it just θ_i+θ_i*2?

The problem is Thus:

Результаты поиска изображений по запросу "laser bouncing off mirror"

  1. Get the angle the light beam makes with the perpendicular of the mirror.
  2. Flip it.

how
edit1: why one edit

That's why I's should have the little dashes on the top and the bottom - to not be confused with an l or a 1. But this topic's not about that so let's just leave it here.

Since Raycasting involves a 2D top-down view of the map, you can probably use that system for mirrors. It will be a chore but might I try.

Unfortunately this system would only work on mirrors that are flat and 2D, concave mirrors might be out of my range for now.