1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

GMS 2 Box2D Raycasting?

Discussion in 'Programming' started by djrain, Aug 22, 2017.

  1. djrain

    djrain Member

    Aug 13, 2017
    Hey all,

    I'm making a physics based game and need some sort of raycasting system to determine line of sight and stuff for the AI.

    I know we have collision_line and those other functions, but those aren't for Box2D physics and thus won't be very accurate (or perhaps even possible) in some cases. I'm not even sure whether they would work with physics enabled...?

    I thought that GameMaker would have some functionality built in for raycasting against physics fixtures, but I'm not seeing anything, not even on the marketplace. Am I missing something? How have others dealt with this?

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice