Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rotation and positioning problem #42

Open
exoticMellon opened this issue Sep 14, 2024 · 1 comment
Open

rotation and positioning problem #42

exoticMellon opened this issue Sep 14, 2024 · 1 comment

Comments

@exoticMellon
Copy link

Screenshot_2024-09-15_00-00-06
how to position the block to base, I have tried to rotate it with the following lines of code (the code is attached as a file):

// Set the initial position of the decoration
decoration->SetPosition({-30.0, -20.0, -20.0});

// Set the rotation (orientation) of the decoration in degrees for each axis (X, Y, Z)
decoration->SetOrientation({45.0, 0.0, 0.0});
code.cc.txt

@bpe2
Copy link
Contributor

bpe2 commented Sep 16, 2024

Hey, I'm not totally sure what you're asking here. Are you trying to rotate that large plane to be aligned with the ground?

The Orientation of a Decoration is the way that it is rotated about each axis. See the GIFs below for reference.

It may just be easier to open your model in Blender, or some other 3D modeling software and rotate it to the desired orientation, if you don't need to change it during the simulation.

Rotation Axis References

X

decoration->SetOrientation({Changing, 0.0, 0.0});

X Axis

Y

decoration->SetOrientation({0.0, Changing, 0.0});

Y Axis

Z

decoration->SetOrientation({0.0, 0.0, Changing});

Z Axis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants