Your comments
Difficult to say.
I don't have this package. But I'm sure it's not that much effort to implement the same principle with package classes.
I will try to contribute to https://github.com/game4automation this week then.
The idea is the following.
Each part and each conveyor has a GuidedEntity and transport script, respectively.
OnCollisionEnter and OnCollisionExit are stored collided conveyors.
In the Update method, Raycast is used cyclically to check which conveyor the part is currently colliding with and to set the speed and position of the articulated anchors. If the part collides with several conveyors at the same time, I take the closest one.
If no collision happens or Conveyor type is wrong, then Joint is destroyed and the physical properties of the part are reset.
When collision happens between Surface and MaterialFlowObject, set MaterialFlowObject.transform.parent = surface.transform. When object leave the collider, set transform.parent back. For example: private void OnCollisionEnter(Collision other)
{
if (!_isDynamic) return;
if (other.gameObject.TryGetComponent(out Entity entity))
{
entity.transform.parent = transform;
}
}
private void OnCollisionExit(Collision other)
{
if (!_isDynamic) return;
if (other.gameObject.TryGetComponent(out Entity entity))
{
if (entity.transform.parent == transform) entity.transform.parent = _pool.Object.transform;
}
}
Sorry, we are developing the program for commercial purposes and cannot share the source code.
I have written IK for industrial robots. Works perfectly!
Customer support service by UserEcho
As I wrote before, just use the following trick. For moving transport surface create new flag. If transport is "Dynamic" then collision events are used.
2022-10-11 22-04-40.mp4