Comments (1)
Hello,
I've noticed a potential issue in the TargetingSystem.cs file on line 141 (TargetingSystem.cs). The GetEntriesInRangeWithHeap method is called with unfilteredChunkIndex as the first parameter. This parameter is intended to be an entity index within kdQuery, to ensure the algorithm does not find the entity that is performing the search. However, in this sample, the seeker entities are not included in kdQuery, so there is no need to skip any entity. Passing unfilteredChunkIndex seems arbitrary here, and we could instead pass -1 as a quick fix for the sample:
Tree.GetEntriesInRangeWithHeap(-1, transforms[i].Position, float.MaxValue, ref Scratch.Neighbours);
If the intention is to include all entities in range and if you need the seeker entities' query index within IJobChunk, it would be more appropriate to first create an index mapping to the job using kdQuery.CalculateBaseEntityIndexArrayAsync.
from entitycomponentsystemsamples.
Related Issues (20)
- Baking Video HOT 1
- TurretAuthoring does not add URPMaterialPropertyBaseColor component
- I cannot install “com.unity.entities.graphics“. HOT 2
- how use ecs 1.0 with assetbundle workflow? HOT 1
- about UntypedWeakReferenceId.
- ecs 1.0 official documentation has error example, Too wrong guidance
- EntitiesSamples can't build for ios, on 2022.3.3f1c1
- Possible Error in BoidsSystem that surprisingly does not breake the simulation.
- Segmentation fault when creating a large number of entities HOT 1
- Player stuck(Not responding)
- Why does the RotationCube in HelloCube-Reparenting have Child components from the beginning
- The model in dots unity project cannot be rendered.
- PhysicsShape in 1.2.0-pre.6 generate wrong collider shape.
- release unitypackage
- trace physic related crash to here, but got no figure out, help! HOT 1
- Procedural mesh case in Miscellaneous isn't working
- Conflicting Comment and Code in Tank Sample
- Tanks Tutorial Inaccuracies
- update to 1.0.16 ,Boids sample can't work!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from entitycomponentsystemsamples.