I’m just trying to understand the code systems.rigidbody.raycastFirst
. It sounds like the entire engine is raycasting from every single rigidbody in the scene? Is that correct? Or is it just casting a single ray from from
to to
, but globally from the engine?
I am using that function like this
from = this.camera.camera.screenToWorld(event.x, event.y, this.camera.camera.nearClip);
to = this.camera.camera.screenToWorld(event.x, event.y, this.camera.camera.farClip);
result = this.engine.systems.rigidbody.raycastFirst(from, to);
It works fine, I just cannot understand what this.engine.systems.rigidbody.raycastFirst
is really doing.