C# - get object data after do a Step

i have some question about this physics system
at first i test three Colid2d goal and get explode result without rotation
my colid2d works well and make distance between colitions
but i just can get positon of my object not rotation property

i have 3 shapes like below

i make this shapes at the same position ( 0,0,0 )
add to each of shapes Colid2d goal
and add Pindex of each goal to my Physicalsystem
after do 10 step
they will explode well and i can get new position data from physicalSystem.GetPosition(x);
but when i search in physicalSystem methods i just see positions data :frowning: like blow

is there any NormalForce or rotation and …
my next question if i make a softbody how can i rotate it ?

I’d recommend using the newer CurveCollide goal instead of the older Collide2d.
There isn’t actually any method for getting the particle orientations from the solver - thanks for reminding me - I should add some!
However, you can get the Output of each of the goals (which can include orientation frames, or oriented objects). This is the way the Kangaroo Grasshopper component does it. Here’s an example with CurveCollide:
curvecollide_script.gh (7.4 KB)

1 Like

thanks daniel it help me well for get object data
but we can solve the output type in grasshopper , but in RhinoCommon (out of grasshopper ) we must say whats type of object

the physicalsystem.getoutput just return me a C# object type

i try the blow codes
Curve _mycurve = physicalSystem.GetOutput(goals)[0] as Curve; // have error
PolyLine _mycurve = physicalSystem.GetOutput(goals)[0] as PolyLine ; // have error
how to convert the output to Curve is there any way out of my tests

It returns an array of curves.
So for example you could use:
Curve[] curvesOut = PS.GetOutput(GoalList)[0] as Curve[];

1 Like

and here’s an example of how you can use custom goals to track frames directly
curvecollide_script_frametracker.gh (6.7 KB)

1 Like