#How do I grab the camera?

1 messages · Page 1 of 1 (latest)

inland fjord
#

So the camera has to be a managed component seperate from the ECS system meaning that I cannot alter it without removing burstcompile.

Is there a way to provide data to the mainCamera so that it can move the way I want it to while not breaking burstcompile?

maiden saffron
#

you have a few options:

  1. do whatever heavy computation you need in burst, save the results to an unmanaged component, and then use a non-burst system to apply the results to the camera (or its follow target)
  2. use a TransformAccessArray to modify the camera's transform directly from a job
  3. use a function pointer to invoke managed code from burst (see #1064581837055348857 message)
#

my recommendation is 1. because it's the simplest and you most likely only have a handful of cameras at most so there would be no real performance benefit to the other approaches

chilly cradle
maiden saffron
#

ohh TIL, that's nice