|
|
SkinnedCloth - moving/rotating bones with script |
Posted by: norbykov - 14-10-2020, 05:02 PM - Forum: Obi Cloth
- Replies (3)
|
|
Hey there,
Apologies if this has been asked before - I searched the forum and couldn't find relevant information.
We set up our character using the instructions and got the simulation working fine. But we're trying to move bones programmatically and can't seem to get it to work. The character's clothing is stuck in the initial pose. We're using Unity 2020 with HDRP.
Thanks for any pointers that you could provide.
|
|
|
How to reset softbody? |
Posted by: relevantname - 14-10-2020, 12:22 PM - Forum: Obi Softbody
- Replies (1)
|
|
Hi,
When I change the shape matching constraints at runtime, the softbody bounces too much. How can I prevent this?
Is there a way to reset particle velocities?
Thanks.
|
|
|
Obi Solver changes gravity for rigidbodies ? |
Posted by: VincentAbert - 13-10-2020, 07:05 PM - Forum: Obi Rope
- Replies (7)
|
|
Hello ! I'm getting more and more comfortable with Obi Rope, but a few things are still a bit complex for me :
first of all, the obi solver seems to change all the physics in my scene : I have not changed the default gravity in Unity (which is the same as the default obi solver value), but whenever there is an active solver in my scene, my character (rigidbody based) doesn't jump as high, as do any rigidbody when added a force ?
Another thing that doesn't make sense to me is the fact that you have to add an obi collider for a dynamic particle attachment : since the attachment will probably intersect with the end of the rope, it seems absurd to add a collider to it ?
Thanks a lot !
|
|
|
Softbody with SkinnedMesh |
Posted by: Yotingo - 13-10-2020, 03:59 PM - Forum: Obi Softbody
- Replies (7)
|
|
Hi,
Our team is considering an Obi Softbody purchase but we want to ensure it will suit our needs.
What are the limitations with using Obi Softbody on an animated SkinnedMesh?
We're basically trying to deform a character's skin when it gets hit.
In your video, I see that you do have an a skinnedMesh with dangly arms.
Does Obi Soft replace the Mesh in those areas? Or are you simply using particles to create the skinnedMesh?
If you have a demo package, we would love to try it out.
Any info will be great!
- Thanks
|
|
|
Tearing rope on Collision |
Posted by: Spectra_7 - 13-10-2020, 11:41 AM - Forum: Obi Rope
- Replies (3)
|
|
I am trying to tear the rope using OnCollision callback. The rope does get cut, but it also throws exception error when tearing.
Code: void Solver_OnCollision(object sender, ObiSolver.ObiCollisionEventArgs e)
{
for (int i = 0; i < e.contacts.Count; ++i)
{
if (e.contacts.Data[i].distance < 0.01f)
{
//ObiColliderBase collider = ObiColliderWorld.GetInstance().colliderHandles[e.contacts[i].other].owner;
Component collider;
if (ObiCollider.idToCollider.TryGetValue(e.contacts.Data[i].other, out collider))
{
if (collider == scissorCollider)
{
ObiSolver.ParticleInActor pa = solver.particleToActor[e.contacts.Data[i].particle];
if (pa != null)
{
ropeObject = pa.actor.GetComponent<ObiRope>();
ropeElements = ropeObject.elements;
}
//print(e.contacts.Data[i].particle);
for (int j = 0; j < ropeElements.Count; j++)
{
if( ropeElements[j].particle1 == e.contacts.Data[i].particle )
{
//print("Contact Particle: "+e.contacts.Data[i].particle);
//print("Element Particle: "+ropeObject.elements[j].particle1);
int particleToTear = ropeObject.elements[j].particle1;
ropeObject.Tear(ropeElements[particleToTear]);
ropeObject.RebuildConstraintsFromElements();
}
}
}
}
}
}
}
It throws index OutOfRange exception.
Code: ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
ScissorCut.Solver_OnCollision (System.Object sender, Obi.ObiSolver+ObiCollisionEventArgs e) (at Assets/Scripts/Cut Logic/ScissorCut.cs:67)
Obi.ObiSolver.EndStep () (at Assets/_IMPORTED/Obi/Scripts/Common/Solver/ObiSolver.cs:1302)
Obi.ObiUpdater.EndStep () (at Assets/_IMPORTED/Obi/Scripts/Common/Updaters/ObiUpdater.cs:104)
Obi.ObiFixedUpdater.FixedUpdate () (at Assets/_IMPORTED/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:69)
I can't figure out, please help.
|
|
|
|