Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Animating rod rest position
#41
(19-06-2021, 03:30 AM)Hakazaba Wrote: I'm sorry this has gone on so long, i have a new issue.

If i edit the position and orientation of the particles on that event, The particles positions become {NAN,NAN,NAN} in the next update statement when i try to retrieve them with rod.GetParticlePosition(). I wonder if perhapse i am causing extreme accellerations by changing them, do i need to set the particles inertia to 0 somehow afterward? Or is the particle position value in local space related to the prior particle?

Can't reproduce this. Can you share the code you're using to update the positions/orientations?

(19-06-2021, 03:30 AM)Hakazaba Wrote: At the moment i am supplying world coordenates.

Remember that solvers expect and return everything in local space, same for actors and blueprints: they store everything in local space. Using world coordinates only works if both your actor and solver have no translation, rotation or scale.
Reply
#42
I found the problem, i had some offset values still being set at start
Reply
#43
(Reposting after emailing the devs. Thanks for the quick reply!)

Using ObiRope v7, I've been trying to do the same thing. Found the code from the rod blueprint doing the setup of the Darboux vectors, and from what I know about coordinate frames and splines it seemed straightforward enough to drive those with an FK/IK control system.

However, both my own code, as well as a copy-paste of Hakazaba's code from 2021, don't appear to work. In the following image you can see the white lines of a kinematic chain, each node rotating the same amount relative to its parent, and you can see that the rod elements don't mirror those rotations as expected.
[Image: image.png?type=image%2Fpng&u=c0ac4119&ac...PZXlTlT2AQ]
I've included the TentacleController.cs file with the code. Can you spot any obvious mistakes?

(Oh and yes, this is for one or two adult games, but not *only* for adult games. ?

Thanks for your time,
Mar
Reply