Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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:
    88
    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. JMPM-UNITY

    JMPM-UNITY

    Unity Technologies

    Joined:
    Jun 16, 2021
    Posts:
    93