CarrotKutay / Colosseum

Experimental Game Development
1 stars 0 forks source link

Raycasts to determine Plane Normal #16

Closed CarrotKutay closed 4 years ago

CarrotKutay commented 4 years ago

How to do ray casts efficiently?

In the documentation on the Unity.Physics package to support ECS - DOTS there are several ways shown as examples to perform raycasts. The one with the least performance cost is supposedly casting the rays in jobs and getting the results back via a NativeArray.

This issue is needed as an extension for #15

CarrotKutay commented 4 years ago

included -> can be closed

added three different versions to perform raycast

  1. Entities.ForEach()
  2. IJob(ForEach)
  3. Job.WithCode

performnce wise there seems to be not much of a difference between all three only looking at the in game statistic screen