C
C#10mo ago
TwitchMutee

3D Unity Raycasting

Hi guys, currently working on a puzzle game involving lasers and mirrors, however, have hit a brick wall right at the end. essentially the laser reflects off the mirrors all the way to the target area, but when it hits the target the raycasting is outputting a debug.log(“target hit”) but isn’t finishing the if statement as straight after it should transform the door position. Any help would be appreciated?
6 Replies
Buddy
Buddy10mo ago
$details
MODiX
MODiX10mo ago
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
TwitchMutee
TwitchMuteeOP10mo ago
No description
TwitchMutee
TwitchMuteeOP10mo ago
the issue is when the raycast hits the target it is not transforming the door position as it should other than that and the code there isnt much more detail i can give
Anchy
Anchy10mo ago
try set a breakpoint and step through the code and check the contents of your door object to see if there are being changes made I guess
TwitchMutee
TwitchMuteeOP10mo ago
trust me already done it’s outputting target hit but won’t move the door which makes zero sense since if i seperate it out to move the door without the laser it lets it move i’m gonna try include layer masks and see if that helps
Want results from more Discord servers?
Add your server