|
|
Obi rope become unstable after climb |
Posted by: lacasrac - 02-10-2023, 08:04 AM - Forum: Obi Rope
- Replies (1)
|
 |
Hello,
If I have a collider and rigidbody and Obi collider+Rigidbody on my character's chest and the character climbing up to the rope,
than the behaviour is weird: the rope become unstable because (I think) of the contact of the rope+character obi collider.
And the rope just get immediatelly a very big speed.
I wanted to add the chest collider to my humanoid character because the rope just culled in to the character, and that wasn't so nice.
How can I do that want I want without any issues?
Thanks,
Leslie
|
|
|
Get the rope REAL particle index on colliision |
Posted by: lacasrac - 02-10-2023, 07:58 AM - Forum: Obi Rope
- Replies (1)
|
 |
I have this oncollision code:
private void Solver_OnCollision(ObiSolver s, ObiSolver.ObiCollisionEventArgs e)
{
var world = ObiColliderWorld.GetInstance();
foreach (var contact in e.contacts)
{
if (contact.distance < 0.025f)
{
var collision = world.colliderHandles[contact.bodyB].owner;
...
var particleIndex = solver.simplices[contact.bodyA];
var contactedRope = (ObiRope)solver.particleToActor[particleIndex].actor;
and after
private int GetParticleNeighborIndex(int particleIndex, int offset)
{
var solverIndex = rope.solverIndices[particleIndex];
var elementCount = rope.elements.Count;
int index;
var e = 0;
for (; e < elementCount; ++e)
if (rope.elements[e].particle1 == solverIndex)
break;
if (e == elementCount - 1 && offset > 0)
index = rope.elements[e].particle2;
else
{
var n = Mathf.Clamp(e + offset, 0, elementCount - 1);
index = rope.elements[n].particle1;
}
if (index > _lastParticleIndex && offset > 0) index = _lastParticleIndex;
return index;
}
But as soon as I have 2 ropes in the same Solver, I get a crash:
IndexOutOfRangeException: Index was outside the bounds of the array.
CreateClimbableObiRope2D.GetParticleNeighborIndex (System.Int32 particleIndex, System.Int32 offset) (at Assets/KLGames/ClimbObiRope/Scripts/CreateClimbableObiRope2D.cs:699)
What is the probleme here?
the crash is in this line
var solverIndex = rope.solverIndices[particleIndex];
IndexOutOfRangeException: Index was outside the bounds of the array.
(particleIndex is 130 but the solverIndices.length is only 87)
How can get back the REAL PARTICLE INDEX?
Thanks
|
|
|
Two questions about soft bodies |
Posted by: oriharu000 - 01-10-2023, 04:37 PM - Forum: Obi Softbody
- Replies (3)
|
 |
hello!
I have two questions regarding soft bodies.
The first one,
The BallPool in the sample scene is set to a blue ball component,
Press the Generator only once on “RubberBall” of “epaintr”,
Press “Bind Skin” of “Softbody Skinner” only once
No other buttons are pressed.
When I play the game, it gets crushed as shown in the image.
And if you fire several balls, the processing becomes heavy.
If I play the sample as is, it works fine.
I'm curious about the error shown in the image, but I can't figure it out.
Please let me know if you have a solution.
The second is
I tried playing this video as is, but the object gets crushed.
https://www.youtube.com/watch?v=nNAhyaoBDI0
It will be used for the white ball in the image.
Please let me know if you have a solution.
The version of Unity is the latest version. 2023.3.10f1
I installed the introduction, learned from the video below, and did it in exactly the same way,
At that time, it was crushed thinly. I've done it slowly and many times, so I don't think I'll make any mistakes.
https://www.youtube.com/watch?v=ikjHVxO3Fks&t=136s
Thank you in advance.
|
|
|
Activating/deactivating the rope, changing its length in real time |
Posted by: Alexander34 - 29-09-2023, 11:38 AM - Forum: Obi Rope
- Replies (3)
|
 |
Greetings again. I have once again encountered a problem. The thing is that my ObiRope has two states. There are two players and there is a rope between them (like in Unravel), the rope becomes material only when both players grab it. The thing is that when I disable ObiRope and turn off collisions, so that it continues its life cycle, but visually it is not visible. I do this so that when I turn on ObiRope rendering, the rope does not make jerks and jumps when changing its length through Cursor. However, I think that I don't need its life cycle in the off state at all. But there is a problem. Players move all the time, and ObiRope.restLentght should always be = Vector3.Distance(player1.transform.position, player2.transform.position). I change its length via cursor and everything would be fine, but - when I turn on the rope rendering and set cursor.ChangeLength(Vector3.Distance(player1.transform.position, player2.transform.position)) there are constantly jerks. I increase and decrease the number of sub-steps in distance and in solver, but it either heavily loads the hardware or behaves very unstable. Please advise me, how do I turn on the rope, set its length in 1 frame between players, and so that it does not jerk and do not attract players jerks, at the same time you should take into account that when you completely disable ObiRope, ObiRopeAttachment also do not follow the players and when you turn on there is a strong jump rope.
How can I calm the rope, setting it evenly stretched between players always, despite the distance between them, limiting it only to increase in length when the characters are separated from each other and shortening if they come together and be able to turn it off and on without jerks and jerks.
|
|
|
Obi Ropes Multiplayer Sync |
Posted by: fevzi - 27-09-2023, 04:25 PM - Forum: Obi Rope
- Replies (6)
|
 |
Hello,
Im trying to sync the rope between client and server but its still kind of weird.
The rope is not getting tense on either the client or the server and the players cant drag the other player properly. ( before multiplayer they could)
Here is some footage: Video
and this is how im syncing the Rope:
Code
|
|
|
obi rope breaks after build. |
Posted by: Alexander34 - 27-09-2023, 09:22 AM - Forum: Obi Rope
- Replies (5)
|
 |
Hi again, I have the following problem.
I have some logic that changes the length of a rope. Everything works fine, however after I make a build in IL2CPP or BuildIn, both in build and in Unity happens what is shown in the video. I have tried a lot of things, but I can't solve it.
Code
Video
|
|
|
Dynamically generating Blueprints from code |
Posted by: michendo - 26-09-2023, 08:56 AM - Forum: Obi Cloth
- Replies (2)
|
 |
Is it possible to dynamically generate a blue print from code?
the reason for this is that I am manipulating regular meshes at run time. When I get the one I want I want to make that mesh behave as an OBI cloth mesh. Can a blueprint be generated from code and attached to an OBI cloth?
|
|
|
|