Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Raycast inside Entities.ForEach()

Discussion in 'Physics for ECS' started by slushieboy99, Aug 29, 2022.

  1. slushieboy99

    slushieboy99

    Joined:
    Aug 29, 2014
    Posts:
    74
    Hi all,
    This may seem like a silly question but I have been banging my head against the wall trying to make a raycast work inside Entities.ForEach(). I've been nearly successful updating the code from this thread, but it's outdated and not quite working for me. I've also tried the code at the bottom of the docs page, but I get burst errors when running it inside Entities.ForEach() even when using .run().

    Does anyone have updated code for how to perform a raycast inside Entities.ForEach()?
     
  2. JosepMariaPujol

    JosepMariaPujol

    Unity Technologies

    Joined:
    Jun 16, 2021
    Posts:
    89