Page 1 of 1

How can I get size of object?

Posted: Thu Mar 05, 2020 8:47 am
by parapoohda
I want to get size of the object. But I can't find it.
Eg. If it is a capsule I want (radius and height).
If it box I want (length width and height).
Thank you

Or I should keep it outside bepu.

Re: How can I get size of object?

Posted: Thu Mar 05, 2020 10:28 pm
by Norbo
The shape types (Box, Cylinder, etc.) all have fields corresponding to their dimensions. If you want to get a reference to a shape that you've already handed over to the simulation, you can grab it using Simulation.Shapes.GetShape<TShapeType>(shapeIndex).

If you don't need to modify the shape, it can be more convenient to just have an external copy. There's no real cost to copying primitive shapes, they're just a few bytes.

Re: How can I get size of object?

Posted: Fri Mar 06, 2020 1:28 am
by parapoohda
Thank you. I think i will copy it