Hi - How I can make the operator to walk to the center of floor spot and face toward the workbench?
Hi - How I can make the operator to walk to the center of floor spot and face toward the workbench?
Here's a user command and example model where you can call faceObject and it will figure out the rotation and apply it to the te (or any object you supply as the first parameter). Also attached is a library to autoinstall the command to any model.
The user command code is:
/**Custom Code*/ Object te=param(1); Object involved=param(2); Variant p3=param(3); Vec3 midbaseFactors=Vec3(0.5,0.5,0); Vec3 factors=midbaseFactors; Vec3 unitx=Vec3(1,0,0); if (p3.type==VAR_TYPE_ARRAY) factors=p3; Vec3 targetloc=involved.getLocation(factors).project(involved.up,te.up); Vec3 tepos=te.getLocation(midbaseFactors); targetloc.z=0; tepos.z=0; Vec3 heading=targetloc-tepos; double angle=heading.angle(unitx); te.rotation.z=angle; return angle;
Attached is your updated model.
15 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