Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

Do something with objects that hit a ray

Okay so I was just thinking how I can do something with other objects if it hits a ray.

This is the trick: When doing raycast, all other objects do raycast too but to the opposite direction (+180°). So if ray A hits object B, ray B hits object A. Now you can do something with both objects! We can make guns in flowlab! :D


  • edited May 2018
    Can't you already do guns without your raycast or even the raycast implemented since they shoot bullets/projectiles?
  • So... pseudo hitscan... ok
  • But if you make projectiles too fast it'll be able to go through objects. I want to hit the enemy immediately, so as fast as possible.
  • I think an option to message "last raycasted object" (or something - that isn't too clear) might do what you want? I almost added that when I added the Ray Cast, but I didn't mainly because the message settings panel is getting complicated.
  • @Latif3 , If raycast hits object A, it sends the angle of the raycast to all objects A, object A receives raycast angle, adds 180 to it, and casts raycast at that angle, if it hits the original object then it outputs. No need for last raycasted. Did I miss anything?
  • @grazer that would be a nice feature
  • Why don’t we have it to where it’s a drop down box
  • Last raycasted? That's exactly what I want. Yes do it!
Sign In or Register to comment.

| make games in your browser
@ 2017, All rights reserved.

Contact us

Get In Touch