Monday night: Joint add or set
So I need to add or set the `PhysicsJoint` component data depending whether one is already present. However I'm not working with the `EntityManager`, I'm working with an `EntityCommandBuffer` which doesn't have the `EntityManager.HasComponent<T>(Entity)` that I need. _(There's an `AddComponent)_
Can I have a query facility that I can use? (e.g. a read-only `EntityManager`) Or I see there's a `EntityQueryCommand`, `EntityQueryComponentCommand` and a `EntityQuerySharedComponentCommand`.
I guess the alternative is not trying to solve this in some magical ECS way but approach it the usual programming way: Have a data-structure that maps joints to entities. I supposed this would have to be a struct-based one -- maybe that NativeHashMap or NativeMultiHashMap
?
Investigated `EntityQuery` -- array of entities with joints! Inefficient but viable for testing.
It's too late for me to get any sort of entry together so guess I'll call this a night and finish this as a private experiment. Has been fun and *very* educational.
Connect the Unity (ECS) DOTS (for ExtraCredits Jam 2019)
An Extra Credits Jam 2019 entry focusing on learning Unity DOTS
Status | Prototype |
Author | Arakade |
Tags | 3D, connecttheunitydots, extragamejam, Unity |
More posts
- Final physics OnCollision flowJun 12, 2019
- ECS & Unity.Physics order diagramJun 08, 2019
- ECS Unity.Physics: Contacts, The Right Way (full OnCollisionEnter(Collision) ana...Jun 06, 2019
- Post-jam next stepsJun 05, 2019
- Post Jam: An empty EntityQuery in OnCreate() disables your systemJun 04, 2019
- Sunday afternoonJun 04, 2019
- Saturday night: Implementing DOTS Unity.Physics OnCollisionEnter() only for cert...Jun 02, 2019
- Saturday afternoon Unity.Physics and DOTS samples strife (after late start)Jun 01, 2019
- Friday nightJun 01, 2019
Leave a comment
Log in with itch.io to leave a comment.