(I’ve accidentally put this in the Physics Previews forum instead of DOTS Physics)
So, I’m trying to implement slider interaction on a collider parented to a rigidbody.
Basically, (in classic physics thinking) I cast a ray, detect a child collider and move it by some mouse offset.
Now, it was easy in GameObject-physics because objects kept parent-child relationships. However, in Unity Physics, as far I understand, during the conversion process, everything gets detached and child colliders become a part of a PhysicsCollider of the root rigidbody, while the graphical part hangs around in separate entities. So, there is no way to keep the relationship with standard authoring components.
I managed to hack this by first adding a Body Authoring to the slider, it makes sure that the collider doesn’t become part of the root during conversion. Then I add a FauxParent component to the child that stores the parent Entity during the conversion process. Then I override the position and rotation in relation to the FauxParent’s Local2World. So the entities are completely separate but the slider “snaps” to the parent. Of course, the parent body and slider colliding-layers never interract (and shouldn’t). Then, I also remove PhysicsVelocity so that the rigidbody doesn’t get updated. It works, but it’s a crazy workaround.

(in the preview it’s just moving to one side because I just add x++ on racast hit for testing :p, but it should eventually work like a slider, but not important right now)
What I really want is actually just to detect collision to the slider, without any physics, no bodies, the root body shouldn’t change center of mass and stuff like that and the sliders are not going to interact with anything else except the mouse. BUT I want to still have the nice authoring component where I can design the slider collider. I just don’t want the collider to become part of root body entity automatically. What about some “don’t become part of root rigidbody” tickbox in physics shape? ![]()
Or am I getting it wrong and there is a nicer way to do this?

