0
Answered

combining MUs

carHock 2 weeks ago in realvirtual.io Starter and Professional updated by Support 5 days ago 5

Hello,

is there a way to combine two or more MUs ?

for example: MU1 (main part) is on a transport surface. At some point it stops and MU2 (smaller part) should be fixed onto MU1. They continue moving on transport surface together without falling apart. I tried to do this by attaching the fixer script to MU1 and unset the gravity of MU2. But with the fixer script MU1 is not moving anymore.

best regards

Carsten

Under review

It seems to be a bug. I am checking it. Best regards Thomas

Please uncomment for the moment these lines, and it should work. We are checking how to proceed with the next release:

private void Start()
{
meshrenderer = GetComponent<MeshRenderer>();

if (!Application.isPlaying)
return;
signalfixerreleasenotnull = FixerRelease != null;
signalfixerfixnotnull = FixerFix != null;
signalbockhandingovernotnull = SignalBlockHandingOver != null;
meshrenderernotnull = meshrenderer != null;
/* var mus = GetComponentsInChildren<MU>();
foreach (MU mu in mus)
{
if (!MUSFixed.Contains(mu))
Fix(mu);
}*/
}

Maybe a better version  - the issue is when the MU is on the same level as the fixer the fixer is fixing itself at start. We are extending our example models for the next release for having more loading and unloading examples.

foreach (MU mu in mus)
{
if (mu.gameObject != this.gameObject)
if (!MUSFixed.Contains(mu))
Fix(mu);
}

Thank you! It works as intended.