Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Relax the rope when required
#6
Hi!

Your collision filters are correctly set up.

(15-02-2024, 04:59 AM)Romahaaa Wrote: but.. even if this will work as expected without jittering, I see another problem here - when rope falls onto pencil or paperclip, it will go through their physics colliders..

Rope particles will inherit the properties of their closest control point via interpolation:
http://obi.virtualmethodstudio.com/manua...setup.html

Quote:In the path editor you can add/remove control points, move/rotate/scale existing control points, and set per-control point properties that will be interpolated to the rope particles.

If your rope only has two control points (one at each end) and you set their collision filters to disable collisions, then all particles in the rope will stop colliding since they can only be close to either control point.

You only need a few particles close to the ends of the rope to skip collisions, so you can add a couple extra control points to get particles in the middle of the rope to collide as usual. Excuse my poor diagram:

(O): control point set to not collide.
(X): control point set to collide.
-: particle that doesn't collide
+: particle that collides


PENCIL  (O)---+++(X)++++++++++++++++(X)+++---(O)  PAPERCLIP


Once the rope is set up this way, both the pencil and the paperclip can safely intersect the ends of the rope, no need to leave a gap between them. See the "Crane" or "FreightLift" sample scenes (and most other scenes involving attachments) as they use collision filters this way.

(15-02-2024, 04:59 AM)Romahaaa Wrote: And the conclusion to all my tests - even combining 2 approaches - avoid rope point intersection with pencil/paperclip colliders and settings up the collision group and masks I still have this issue. Seems the problem is somewhere else

Other than collisions there isn't any other obvious culprit. Pencil movement doesn't seem to be the culprit, since in the video the rope jumps upwards right after the pencil stops moving.

A similar issue could be caused a very large sudden drop in performance: since physics integrate velocities over time using the time passed since the last frame (delta time), if a frame takes very long to render then the position of the paperclip will be very different from last frame (position += velocity * deltaTime) and the rope will need to apply a very large force the next frame to bring it back into place, causing it to jump. While unlikely to happen in a simple game, you can check the profiler to see if there's any spikes in performance that coincide with the rope jumping. If that's the case, finding and fixing the cause of the spikes would get rid of the issue.

Anyway, would it be possible for you to build a small scene/project that reproduces this issue and send it to support(at)virtualmethodstudio.com, so that i can take a closer look and be able to help more effectively?

kind regards,
Reply


Messages In This Thread
Relax the rope when required - by Romahaaa - 12-02-2024, 03:43 AM
RE: Relax the rope when required - by josemendez - 12-02-2024, 01:15 PM
RE: Relax the rope when required - by Romahaaa - 14-02-2024, 04:48 AM
RE: Relax the rope when required - by josemendez - 14-02-2024, 06:58 AM
RE: Relax the rope when required - by Romahaaa - 15-02-2024, 04:59 AM
RE: Relax the rope when required - by josemendez - 15-02-2024, 07:18 AM
RE: Relax the rope when required - by Romahaaa - 15-02-2024, 11:50 AM
RE: Relax the rope when required - by Romahaaa - 26-02-2024, 11:03 AM