08-07-2024, 12:02 PM
(This post was last modified: 08-07-2024, 12:03 PM by josemendez.)
(04-07-2024, 10:39 AM)Jaxel Wrote: How can i get the speed of first 1-2 rope particle point and also tension force?
Hi!
You can get any per-particle value (velocity, position, size, etc) using the particles API. To get the index of the first particle on the rope, you should use the rope's elements array.
(04-07-2024, 10:39 AM)Jaxel Wrote: How can I compare the current rope tension with the tension at rest?
By definition, the tension at rest or any object is zero. Maybe you're interested in strain instead, which is the % of deformation caused by tension? You can calculate it like this:
Code:
float strain = rope.CalculateLength() / rope.restLength;
It will be 1 when the rope is at rest, >1 if stretched, <1 if compressed.
kind regards