Creating LOS or flashlight shadow



Ok I guess I’ll do that… thanks.
Also, how do you do the collision detection without the detection block? I don’t think I did it right


The easiest way is to test if the point is within the shape of the object, which of course depends on the shape of the object.

For a rectangle (with rotation of 0 or 180 only)
• Px, Py are x & y position of point to test
• Rx, Ry are x & y position of the rectangle
• Width, Height are traits of the rectangle


The 2.88 comes from (Height/2)/1.44, where the 1.44 is a scale factor because the object’s height & width properties include “white space” around the object (because of the way the images were created)


Thanks! I got it done!


Looks good :+1:
(btw, I edited the equation above to account for the scale factor)


Sweet thanks! Now I have to figure out how to make it into a game…


Do you have any ideas for using this concept?
(Sorry for tagging…)


Well, I’m not any of those people lol, but I suppose a game where you have to chase always these monsters that come in the dark, and you scare them away with the light?


That would work but remember that it’s kinda slow…


Okay, let me try the project when I have time, but meanwhile I have to go, I hope I can think of something that works as a suitable game!


K sounds good. Here is another link


Update your bio to 4 features


Remember? You were doing some bank heist game?


Oh ya duh… thanks for the reminder! I’ll start working on that


Could you post a project that is sideways then unpublish it so I can have a sideways template?


Ok. I’ll get you a link.


Thanks! I’m stuck with a phone bc my bro hogs the Ipad…

Go to the banner at the top saying “Open in Hopscotch”


Thanks! I got it


Just FYI, there’s a pretty minor edit you can do to enable for updating every frame.


What is it? It would be helpful