Hey there! I’ve joined a small game jam to try and scratch the rust off of my game dev skills.
So my game idea is somewhat simple, 3D puzzle game focused around redirecting spells shot from a wizard to hit a switch on the other side of the room. I’ve got the reflection of a ray trace working, and I suspect it would work perfectly for fireballs and the like, but I will need ray tracing for a lightning spell, and I’m running into an issue with reflecting mirrors back on themselves. I probably wont design any puzzles to require reflecting mirrors at each other, but it causes issues that the final user of the game may run into (such as rotating mirrors to a new position and crossing paths with the mirror reflecting the current ray to it… it’s kind of hard to explain. I’ll get a video of it happening.
As you can see it sort of loses all the tracing going towards it, and only can regain it if I wiggle the other mirrors around a bit and fire the ray trace at it again.
Here’s the initial code I use to get the wizard to fire the trace. (I set the firing boolean to true in the character controller when the space bar is pressed.)
**Here’s the code I use to get the mirrors to reflect. **
I’d sincerely appreciate anyone’s help. I have a feeling that the raytrace hit event on the mirrors is only able to handle one trace at a time, but all edits I’ve made to it to try and incorporate an array of hits has failed. I really want to be able to stop bumping my head against the wall on this and move on to something else.