How to get height position for a simulated ball falling to ground, in every frame

Hello my dear Ladies and Gentlemen,

I need your help.

I have a ball, simulated to fall to ground using dforce.

When I play the simulation, the ball height position (Y translation property) never changes, it stays the same and yet, the ball is falling down to ground,

getting each frame closer to the ground.

I need a way to be able to get Y position for every frame the ball is falling to ground.

Thank you,

marius.

Comments

  • Richard HaseltineRichard Haseltine Posts: 100,945

    You could use the Align pane, I think, to align a horizontal plane to the bottom of the ball and read its height. The item does stay in place as it isn't moving, a (dForce) modifier is being applied to change the mesh belonging to it.

  • marius_ifmarius_if Posts: 48

    Thank you, Sir Richard Haseltine!

    You've never stopped being a sweetheart, a most lovely person and a very helpful friend.

    I'll try that asap.

    Thank you for your very fast help and unbelievable quick reply.

    I have no idea what comes first, helping people or having first the morning coffee, I'm afraid you still do the first option.., you are unbelievable dear and a most wonderful soul and friend.

    Daz people have only this drawback, they are all so kind and so helpful.

    Thank you, Sir Richard.

    Hugs,

    marius.

  • marius_ifmarius_if Posts: 48

    Dear Sir Richard Haseltine,

    As you have mentioned, the ball it isn't moving, it is a dforce modifier as you said.

    I shall need to find a different approach, it might not be the most ellegant but in the long run, I might find - hopefuly - a more decent solution.

    I've found if I would send the ball to Hexagon and have it sent back as a prop into Daz Studio, the prop will keep the proper height for the current frame the ball was sent.

    Sending it to ground would give the height position for it's current frame.

    I assume there is no public dforce api documentation yet so, I'll try some approaches to get the problem solved.

    Sending it to Hexagon may not be a solution but it shows it is still possible to get somehow the height for the simulated ball.

    I shall return with another solution, if I'll find a more ellegant or at least more efficient one.

    Hugs,

    marius.

    (if-comes from my abbreviated full name..)

  • Richard HaseltineRichard Haseltine Posts: 100,945

    Sorry my first idea didn't work out. The drop to floor is a neat solution.

  • PraxisPraxis Posts: 254
    edited April 2020

    In script, this will give you the Worldspace height of the centroid of oSimNode's mesh at the current animation frame:

    var nNodeWSPosY = oSimNode.getWSBoundingBox().getCenter().y;

     

    P.S. It's also possible to use a "Rigid Follow Node", but that seems to cause some wierd Y-Axis rotations which may (or may not) be a problem for your project.  See this post and subsequent posts.

     

    Post edited by Praxis on
  • marius_ifmarius_if Posts: 48

    Thank you, Sir Richard Haseltine, and many thanks Sir Praxis.

    The rigid follow node and Worldspace height for the simnode would do the most efficient job, I assume. 

    Rigid follow node height would also be very useful, Y axis rotation would be no concern for my project.

    Thank you very very much, gentlemen!

    Hugs,

    marius.

     

  • marius_ifmarius_if Posts: 48

    Dear Sir Richard Haseltine, dear Sir Praxis,

    Thank you very very much, thank you from the very bottom of my heart, the script is slim and it is working smooth as butter!

    Hugs,

    marius.

     

Sign In or Register to comment.