GMS 2 Box2D Raycasting?

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

  1. djrain

    djrain Member

    Joined:
    Aug 13, 2017
    Posts:
    139
    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