RayCast2

All about RayCast2. The 2 dimensional Raycasting module for roblox studio. Devforum Post: https://devforum.roblox.com/t/raycast2-cast-rays-on-a-2d-surface/1430643

About

RayCast2 is an easy to use, accurate and documented Raycasting module, specifically for Guis and 2D Game development. Its similar to how Raycasting works when using parts in Roblox studio. If you are into 2D game development, this module is for you!

Raycasting is a very beneficial concept. Read more about it on the wiki: https://en.wikipedia.org/wiki/Ray_casting

Why use RayCast2?

2D Game development engine features are not present in a wide variety in Roblox studio, therefore I created this module to ease development for some of you. This module is an accurate and easy to use ray casting module for guis.

"Oh thats easy to make! Why use it then?"

RayCast2 not only is accurate but also works with Rotated gui elements!

"Ha! What if there was another gui in front of that?!"

If there was. It'll work as expected! It'll strike the gui that comes in its way first!

"Hmm, that ray points in only 1 direction, what if I wanted to make diagonal rays??"

This module has got your back, it can cast rays in any direction!

Raycasting on a 2D surface can be used in many areas of a 2D game. For example:

  • Identifying obstacles

  • Making AI

  • Turrets

  • Projectiles

  • Other such mechanics

Last updated