Skip to content
This repository has been archived by the owner on Jan 11, 2025. It is now read-only.

DOTS physics support #4

Open
chris-rgr opened this issue Dec 30, 2020 · 6 comments
Open

DOTS physics support #4

chris-rgr opened this issue Dec 30, 2020 · 6 comments

Comments

@chris-rgr
Copy link

Understandably, HPTK was built for 'classical' Unity physics. Unity's new DOTS ecosystem includes a new physics system, however, which is quite different from the 'old' system due to the general nature of DOTS. I have only had a short glance at the documentation but it seems that the Physics system is (again, understandably) very tightly/centrally integrated into this package. Is this correct? How much work do you estimate is necessary to make this work with HPTK - would it be feasible or essentially require a complete rewrite?

@jorgejgnz
Copy link
Owner

Support to Unity DOTS won't be included as I only have access to DOTS packages for a limited time and HPTK is intended to be used also by people who don't own a Unity Pro license.

If you want to add support to DOTS, it would be required to:

  1. Make a slave hand (ragdoll hand) using DOTS physics colliders, rigidbodies and joints.
  2. Implement a new HandPhysics module valid for DOTS physics.
  3. Implement CollisionNotifier, TriggerNotifier and PhysHelper equivalents for DOTS physics.
  4. Modify SlaveHandModel and SlaveBoneModel to include references to these new colliders, joints, rigidbodies and collision notifiers
  5. Modify InteractorController to listen to these new collision notifiers.

The rest of HPTK modules that don't use physics (Core, Avatar, ProxyHand, Input, etc.) will still be valid with DOTS.

@chris-rgr
Copy link
Author

Thanks for your quick reply and the hints on where to get started. As a quick side note: DOTS is open for everyone and does not require a Pro license.
I will evaluate whether a port makes sense and is feasible for me to do (work-load wise) in the coming year - I will post here in case I do.

@KellanHiggins
Copy link

DOTS is amazing and it is the future of Unity! But they are trying their best to bridge the gap between the two spaces. I think in 2 - 3 years most of Unity will be DOTS-centric.

@jorgejgnz
Copy link
Owner

DOTS is open for everyone and does not require a Pro license

Great to know thank you! I should start playing around with DOTS. I've read that Unity's plans are to move from PhysX to DOT's based Unity Physics so this issue is important if we want HPTK to be valid for future Unity's versions.

@chris-rgr
Copy link
Author

DOTS is very worthwhile for performance critical and/or parallel tasks! That said, it can still be a bit of a nuisance to work with as they're still working on the tooling. I honestly doubt they will completely get rid of PhysX in the foreseeable future - just like GameObjects and MonoBehaviour it is so central to so many projects that dropping support for it would lead to major backlash.

@KellanHiggins
Copy link

@chris-rgr For sure, it is gonna be a slow transition away, but PhysX isn't gonna get any new features or anything. They are focused on Unity Physics and Havoc now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants