22-10-2021, 07:21 AM
(This post was last modified: 22-10-2021, 07:49 AM by josemendez.)
(22-10-2021, 04:07 AM)sangku2000 Wrote: cursor.ChangeLength(Vector3.Distance(attachmentStart.transform.position, attachmentEnd.transform.position) * distanceRate * Time.deltaTime);
// length is adjusted by rate and time.
}
But.... I think self collider is seem to be not working...
Do not multiply by Time.deltaTime, it does not make any sense in this context. You're not changing the length over time, you're just setting it to a specific value. Multiplying by Time.deltaTime (which is a very, very small value, like 0.001) will set the length of your rope to be pretty much zero. This will result in a rope made of only two particles: one at each end. So no collisions will take place since there are no particles to collide with.
(22-10-2021, 04:07 AM)sangku2000 Wrote: I think i need to recalculate the element.. is right?
No need to