Overlapsphere where do I call it?

Options

I'm learning.
I want entity to cast overlapsphere and detect every other entities in radius and add them to list and remove when object is out of range. Where do I should call it? In Update? In Simulateowner? In Fixedupdate?
Its really not clear for me how should I use it.
I need it for gun autotargeting closest enemy in range.

Answers

  • Hello @buhu,

    There is not really a right place to call the Bolt Physics System, but generally, it´s done either on the SimulateOwner callback or a result of a Command processing on the ExecuteCommand, for example, this way you execute it alongside the physics tick, as Bolt runs based on the FixedUpdate.

    -
    Ramon Melo
    Photon Bolt Team