18-09-2022, 12:05 PM
When we use rope, we cannot see what happening, but when I use chains, it will be very ugly.
Can you help me how to change it to simulate a better visualization?
Here is my code
Can you help me how to change it to simulate a better visualization?
Here is my code
Code:
public void ChangeLength(float speed) {
//ezt update-ben kell meghivni
if (isLengthChangable) {
if (_obiRopeCursor == null) {
_obiRopeCursor = gameObject.AddComponent<ObiRopeCursor>();
_obiRopeCursor.cursorMu = .1f; //feletol
_obiRopeCursor.sourceMu = .1f;
_obiRopeCursor.direction = true;
}
_obiRopeCursor.ChangeLength(rope.restLength + speed * Time.deltaTime);
}
}