Hi there,
When using this code below:
patient.Companions.clone().push(patient)
to let companions walk with patients, how we can avoid the visual problem so companions and patients are not standing on top of each other.
thanks
Hi there,
When using this code below:
patient.Companions.clone().push(patient)
to let companions walk with patients, how we can avoid the visual problem so companions and patients are not standing on top of each other.
thanks
Hi @Maryam H2, was Ryan Clark's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.
If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.
Hi @Maryam H2,
You can set the location of the Companion using Companion.location (FlexScript Class - Object (flexsim.com)). You can set the location vector to be equal to the current location plus some offset, and that should place the companion next to the patient instead of the same location as the patient.
I hope this helps! Let us know if you have further questions!
Thanks for the answer! Using this approach, could I apply it to all companions that the model creating in real time. In the model, all patients have at least one companion.
Yes, you should be able to apply this in real-time. Wherever you're running the code to create the Companions, you can just have a line of code immediately after that that sets their location.
I'm creating companions as shown below, do you mean using a custom code should I set a location? I tried it and it doesn't work.
14 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved