Page 1 of 1
v1. Lock movement in Y axis.
Posted: Fri Feb 15, 2019 2:07 pm
by AlexCereus
Hello.
I need to lock movement in Y axis for all objects in space, so they can move only in XZ plane. How can I do it?
Excuse me for my English.
Re: v1. Lock movement in Y axis.
Posted: Fri Feb 15, 2019 10:07 pm
by Norbo
Something like this would work:
viewtopic.php?t=2539
Re: v1. Lock movement in Y axis.
Posted: Mon Feb 18, 2019 11:49 am
by AlexCereus
Thank you.
The easiest approach is setting two of the rows of the local inverse inertia tensor in every dynamic body to all zeroes.
How can I do it in V2? Which method? I can't find.
Re: v1. Lock movement in Y axis.
Posted: Tue Feb 19, 2019 12:47 am
by Norbo
The BodyDescription contains a LocalInertia field. You can set that prior to adding it to the Bodies set.
If you want to access an existing body's local inertia, you could use something like:
Code: Select all
ref var localInertia = ref new BodyReference(bodyHandle, Simulation.Bodies).LocalInertia;
Re: v1. Lock movement in Y axis.
Posted: Wed Feb 20, 2019 8:19 am
by AlexCereus
Thank you again.