Posts: 30
Threads: 7
Joined: Nov 2022
Reputation:
0
I wanna make a kinda stretchy rope obstacle in my game, kinda like boxing ring ropes.
But most of the times if my ragdoll is running fast enough it will pass through the rope, unless i increase its control points thickness to something like 2, which looks just too big.
Any ideas?
Posts: 6,321
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
21-11-2022, 03:27 PM
(This post was last modified: 21-11-2022, 03:40 PM by josemendez.)
(21-11-2022, 02:53 PM)Milionario Wrote: I wanna make a kinda stretchy rope obstacle in my game, kinda like boxing ring ropes.
But most of the times if my ragdoll is running fast enough it will pass through the rope, unless i increase its control points thickness to something like 2, which looks just too big.
Any ideas?
Hi!
Depends on what the exact culprit is. Increasing the mass of the rope will help in any case (you can do this on a per-control point basis in the path editor)
- If tunneling is the issue or you want to keep the rope's mass low, using a few more substeps (you can find this setting in the ObiFixedUpdater)should also help.
- If the ragdoll is passing trough gaps in between rope particles, you might benefit from surface collisions:
http://obi.virtualmethodstudio.com/manua...sions.html
kind regards,
Posts: 30
Threads: 7
Joined: Nov 2022
Reputation:
0
21-11-2022, 04:05 PM
(This post was last modified: 21-11-2022, 04:18 PM by Milionario.)
(21-11-2022, 03:27 PM)josemendez Wrote: Hi!
Depends on what the exact culprit is. Increasing the mass of the rope will help in any case (you can do this on a per-control point basis in the path editor)
- If tunneling is the issue or you want to keep the rope's mass low, using a few more substeps (you can find this setting in the ObiFixedUpdater)should also help.
- If the ragdoll is passing trough gaps in between rope particles, you might benefit from surface collisions:
http://obi.virtualmethodstudio.com/manua...sions.html
kind regards,
Hi, I tried your solutions.
Please watch my video, you can watch it at a higher speed to save time if you need!
EDIT: just saw the quality is bad, sorry...
Also worth to mention that the ragdoll mass is dynamic but it its mostly around 1 to 7 per body part rigidbody (15 of them)
Posts: 6,321
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
21-11-2022, 04:21 PM
(This post was last modified: 21-11-2022, 04:25 PM by josemendez.)
(21-11-2022, 04:05 PM)Milionario Wrote: Hi, I tried your solutions.
Please watch my video, you can watch it at a higher speed to save time if you need!
Hi,
Seems like your character isn't reacting to the rope the way a rigidbody is supposed to, which is quite strange. Increasing the mass of the rope should make the character pretty much stop right dead in its tracks, but instead it basically ignores the rope .-which is quite the opposite of what should happen-, and this is the case even when increasing the radius/thickness of the rope. Basically everything in the video is behaving in a really strange way.
Am I right in assuming your character is a ragdoll made of Rigidbodies? Do all your ObiRigibody components have the " kinematic for particles" option disabled?
Could you give some more information about how you've set your ragdoll up, and how the active ragdoll works?
If it's possible for you, you can share your project (or a reduced version of it) and I will take a closer look to diagnose the problem. You can share it by sending to support(at)virtualmethodstudio.com.
kind regards,
Posts: 30
Threads: 7
Joined: Nov 2022
Reputation:
0
21-11-2022, 04:27 PM
(This post was last modified: 21-11-2022, 06:14 PM by Milionario.)
(21-11-2022, 04:21 PM)josemendez Wrote: Hi,
Seems like your character isn't reacting to the rope the way a rigidbody is supposed to, which is quite strange. Increasing the mass of the rope should make the character pretty much stop right dead on its tracks, but instead it basically ignores the rope .-which is quite the opposite of what should happen-, and this is the case even when increasing the radius/thickness of the rope. Basically everything in the video is behaving in a really strange way.
Am I right in assuming your character is a ragdoll made of Rigidbodies? Do all your ObiRigibody components have the "kinematic for particles" option disabled?
Could you give some more information about how you've set your ragdoll up, and how the active ragdoll works?
If it's possible for you, you can share your project (or a reduced version of it) and I will take a closer look to diagnose the problem. You can share it by sending to support(at)virtualmethodstudio.com.
kind regards,
Yes the character is a ragdoll made of colliders and rigidbodies, all of its bodyparts have these
EDIT: hmm the image looks fine under edit mode? why is it a base64 string here?
removed image because wasnt showing but basically all my ragdoll bodyparts have ObiColliders and ObiRigidbodies, kinematic for particles = false
Other information could be shared on the email you provided
(21-11-2022, 04:21 PM)josemendez Wrote: Hi,
Seems like your character isn't reacting to the rope the way a rigidbody is supposed to, which is quite strange. Increasing the mass of the rope should make the character pretty much stop right dead in its tracks, but instead it basically ignores the rope .-which is quite the opposite of what should happen-, and this is the case even when increasing the radius/thickness of the rope. Basically everything in the video is behaving in a really strange way.
Am I right in assuming your character is a ragdoll made of Rigidbodies? Do all your ObiRigibody components have the "kinematic for particles" option disabled?
Could you give some more information about how you've set your ragdoll up, and how the active ragdoll works?
If it's possible for you, you can share your project (or a reduced version of it) and I will take a closer look to diagnose the problem. You can share it by sending to support(at)virtualmethodstudio.com.
kind regards,
Just tried with a falling cube and the rope never lets it go through and it bounces accordingly.. So its something with the character, but what could i try to pinpoint the problem?
Posts: 30
Threads: 7
Joined: Nov 2022
Reputation:
0
21-11-2022, 06:29 PM
(This post was last modified: 21-11-2022, 06:48 PM by Milionario.)
(21-11-2022, 04:27 PM)Milionario Wrote: Yes the character is a ragdoll made of colliders and rigidbodies, all of its bodyparts have these
EDIT: hmm the image looks fine under edit mode? why is it a base64 string here?
removed image because wasnt showing but basically all my ragdoll bodyparts have ObiColliders and ObiRigidbodies, kinematic for particles = false
Other information could be shared on the email you provided
Just tried with a falling cube and the rope never lets it go through and it bounces accordingly.. So its something with the character, but what could i try to pinpoint the problem? Increasing an ObiCollider thickness value from 0 to 0.1f for example, gives better results, but the visual part has to be remediated by increasing the extruded renderer thickness scale
Setting it to a negative value like -0.2f will have the effect of not even colliding at low speeds
Posts: 30
Threads: 7
Joined: Nov 2022
Reputation:
0
https://gyazo.com/142551ed697eea873cbd61a5b1af2ec6
this gif shows my ragdoll hitting a really thin cube (simulating a rope shape), it doesnt go through
Posts: 6,321
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
22-11-2022, 08:34 AM
(This post was last modified: 22-11-2022, 08:35 AM by josemendez.)
(22-11-2022, 12:46 AM)Milionario Wrote: Increasing an ObiCollider thickness value from 0 to 0.1f for example, gives better results, but the visual part has to be remediated by increasing the extruded renderer thickness scale
Setting it to a negative value like -0.2f will have the effect of not even colliding at low speeds
Negative values make the collider thinner (positive values make it thicker, and 0 leaves it its its default thickness) so using a negative values will of course make the problem worse.
(22-11-2022, 12:46 AM)Milionario Wrote: https://gyazo.com/142551ed697eea873cbd61a5b1af2ec6
this gif shows my ragdoll hitting a really thin cube (simulating a rope shape), it doesnt go through
This is a static cube, so it doesn't apply any forces to the ragdoll: it just kinematically projects any penetrating colliders outside of it. It doesn't relate in any way to a rope. I would expect the ragdoll to collide correctly against any static geometry.
(22-11-2022, 12:46 AM)Milionario Wrote: Just tried with a falling cube and the rope never lets it go through and it bounces accordingly.. So its something with the character, but what could i try to pinpoint the problem?
Yes, I suspect the problem lies in the way the active ragdoll is implemented, and how it controls the rigidbodies. From your first video, it's clear that the ragdoll is largely ignoring the forces applied by the rope: it's as if only a small percentage of the force imparted by the rope is actually affecting the rigidbodies. Obviously, the larger the ragdol collider and/or the particles, the more time they spend overlapping each other so these small force is applied during more frames, which amounts to a larger net force, hence the feeling that it works better when you make colliders thicker.
If possible, could you share a small scene/project that reproduces this issue? I think that's the fastest way for us to sort this problem out.
kind regards,
Posts: 30
Threads: 7
Joined: Nov 2022
Reputation:
0
22-11-2022, 02:55 PM
(This post was last modified: 22-11-2022, 03:10 PM by Milionario.)
(22-11-2022, 08:34 AM)josemendez Wrote: Negative values make the collider thinner (positive values make it thicker, and 0 leaves it its its default thickness) so using a negative values will of course make the problem worse.
This is a static cube, so it doesn't apply any forces to the ragdoll: it just kinematically projects any penetrating colliders outside of it. It doesn't relate in any way to a rope. I would expect the ragdoll to collide correctly against any static geometry.
Yes, I suspect the problem lies in the way the active ragdoll is implemented, and how it controls the rigidbodies. From your first video, it's clear that the ragdoll is largely ignoring the forces applied by the rope: it's as if only a small percentage of the force imparted by the rope is actually affecting the rigidbodies. Obviously, the larger the ragdol collider and/or the particles, the more time they spend overlapping each other so these small force is applied during more frames, which amounts to a larger net force, hence the feeling that it works better when you make colliders thicker.
If possible, could you share a small scene/project that reproduces this issue? I think that's the fastest way for us to sort this problem out.
kind regards,
I will send a link that contains the project files so you can take a look, I created a small scene with just a falling ragdoll, no forces applied to it, so its just a normal dead ragdoll, the problem is still there.
I will send it to that email you provided me
EDIT: Email sent
Posts: 6,321
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
22-11-2022, 04:36 PM
(This post was last modified: 22-11-2022, 04:42 PM by josemendez.)
(22-11-2022, 02:55 PM)Milionario Wrote: I will send a link that contains the project files so you can take a look, I created a small scene with just a falling ragdoll, no forces applied to it, so its just a normal dead ragdoll, the problem is still there.
I will send it to that email you provided me
EDIT: Email sent
Hi,
There's a few problems going on in the scene:
- Your rope's stretching scale is set to zero. This will try and force the rope to collapse to a point, since any length x 0 = 0. This will cause collision constraints to work worse since the rope's primary goal is to set its length to zero. Typically, you always want the stretching scale to be 1, and only increase or decrease it to scale the length. If you want the rope to be stretchy, increase stretch compliance instead.
- All rigidbodies in the ragdoll weight 5 kg, so the total mass of the ragdoll is 75 kg. Rope mass should be at least 7.5 kg per particle to keep a reasonable mass ratio (1:10) and withstand the ragdoll's weight under normal gravity acceleration.
- Rope simulation is being updated 4 times per frame (4 substeps in the ObiFixedUpdater), but rigidbody physics are only updated once at most. The result is that rigidbodies react very late to forces applied by the rope, and these do not propagate fast enough trough joints. The solution is to decrease your physics timestep to increase the frequency at which rigidbody physics is updated, and reduce the amount of substeps accordingly. This ensures that the rope and the rigidbodies are updated in sync, and that forces propagate fast enough trough all constraint trees.
These are the settings I tweaked:
- Set stretching scale to 1.
- Set substeps in ObiFixedUpdater to 1 (could use 2 if you want more stretch-resistant rope)
- Set rope blueprint resolution to 0.5.
- Set rope's mass to 10 for both control points.
- Set Unity's fixed timestep to 0.005 (that is, 0.02/4, which yields the same update frequency for ropes as 4 substeps, but also updates rigidbodies in sync).
With these settings, I can drop the ragdoll from very far above the rope and it reacts properly without any penetration.
let me know if you need further help,
kind regards
|