Component Moving Vertically

Is there a way to make a component move vertically (along the Z axis)?

I TRIED A MILLION THINGS

thank you!

Just replace the WorldPositionMatrix of the componentā€™s root node (vcNode) with a new value.

1 Like

Thank you, but Iā€™m looking for something more continuous. I donā€™t want the component to ā€˜teleportā€™ to a higher position.

How about VcSimVehicle ?

The problem with VcSimVehicle is that it only moves along the X axis. If I program it to move to a point above it, it will rotate such that its x axis is pointing towards that point, and then move towards it like that. It doesnā€™t look good if youā€™re trying to simulate a wheeled robot.

I could rotate the origin of the robot, such that its x axis is pointing up, but I need it to also move horizontally in other situations.
If there was a way to rotate the origin of a component in an automated way (with Python), I could do it, but I didnā€™t find a way to do that.

I think that the moving resource components (like humans and mobile robots) in eCat also ā€œjust teleportā€ by manipulating the componentā€™s position matrix directly, but it is done in a way that gives the impression of continuous motion. You could take a look how those are implemented. Their logic might assume motion mostly on on the XY plane, but nothing should stop you from doing arbitrary motion in the same way.

1 Like

yeah, I used a for loop in the end, and Iā€™m guessing something very similar is used in the implementation, itā€™s just that I avoid using solutions like these when I can; getting too ā€˜creativeā€™ with the Python API can sometimes make the simulation unpredictable/buggy.
I really hoped VC provides something for my use case

What type of component are you working with?
For example, mobile robots can move vertically if you place a pathway vertically.
Another alternative is to have the component moving in the X-Y plane, but then you add one extra joint to the robot that can translate in the Z axis. This gives the illusion of the component moving vertically.