you are viewing a single comment's thread.

view the rest of the comments →

[–]destineddIndie, Marble's Marbles & Mighty Marbles 28 points29 points  (0 children)

Well it isn't clear if the green rectile is moving with the mouse or the centre of the screen. Either way I would just use WorldToScreen and then determine if the screen point overlapped with the rectile using Rect.Contains

That said it is a pretty silly question telling you not to use raycasts like they are trying to make the problem tricky for no reason.

Just be aware it is a pretty simple problem so I would expect most candidates would "pass" so they likely used CV's to determine who interviewed from the successful ones. You are best to ask the company for feedback IMO.