Component Moving Vertically

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


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.