Hello
As the title, when I run a kinematic, I want to get distance between two objects in real-time, sometimes maybe the object is a line or cube, so that is the problem.
best wishes
Hello
As the title, when I run a kinematic, I want to get distance between two objects in real-time, sometimes maybe the object is a line or cube, so that is the problem.
best wishes
Hi @Orry,
This post may be helpful. https://answers.flexsim.com/questions/79893/distance-between-two-objects.html
Can you post your model?
For two objects : obj1 and obj2
Vec3 centres=Vec3(0.5,0.5,0.5); // set up centre factors for the axes updatelocations(obj1); // in case they are moving updatelocations(obj2); Vec3 locDiff=obj1.getLocation(centres).project(obj1.up,model())-obj2.getLocation(centres).project(obj2.up,model()); // projecting onto the model in case they are in different containers/coordinate systems double distance=locDiff.magnitude;
13 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