It’s cool to fix it, but why? Is it a DOTS quirk that just arbitrarily deletes entities with “wasteful” systems running on them?
The actual problem isn’t really what Nathan thought it was. The trouble is that you don’t get very reliable error messages using the DOTS system. You would actually get an error that would shut down a script if it was in the regular entity space…
The problem is in this line:
rotation.Value = quaternion.LookRotation(toDestination, new float3(0,1,0));
If you watch the cubes JUST before they dissappear, they start to turn a bit. This is the Quaternion.LookRotation starting to act quirky, as the distance approaches zero. When the distance == zero, quaternion.LookRotation will return (NaN, NaN, NaN) (this means Not a Number, which is the value you get when you divide by zero), which will then be applied to the entities rotation. At this point, the Hybrid renderer will fail to render the entity because the rotation won’t make any sense.
Thank you!
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.