Latest Threads |
Rope going through wall
Forum: Obi Rope
Last Post: josemendez
11 hours ago
» Replies: 1
» Views: 9
|
Change rod section at run...
Forum: Obi Rope
Last Post: matty337s
02-08-2025, 06:07 AM
» Replies: 0
» Views: 43
|
Sliding along a rope
Forum: Obi Rope
Last Post: vrt0r
01-08-2025, 07:43 PM
» Replies: 0
» Views: 37
|
In SolidifyOnContact exsa...
Forum: Obi Fluid
Last Post: asimofu_ok
01-08-2025, 04:15 PM
» Replies: 2
» Views: 81
|
Is it possible to render ...
Forum: Obi Fluid
Last Post: asimofu_ok
01-08-2025, 10:07 AM
» Replies: 2
» Views: 98
|
Cloth has stretchy behavi...
Forum: Obi Cloth
Last Post: Andreia Mendes
31-07-2025, 02:38 PM
» Replies: 22
» Views: 888
|
Get separate particles pa...
Forum: Obi Fluid
Last Post: slimedev
29-07-2025, 06:51 PM
» Replies: 6
» Views: 3,214
|
Solver outside of hierarc...
Forum: General
Last Post: Jawsarn
29-07-2025, 06:19 PM
» Replies: 4
» Views: 186
|
Rope ignoring colliders o...
Forum: Obi Rope
Last Post: josemendez
24-07-2025, 07:03 AM
» Replies: 1
» Views: 138
|
Ladder made by Ropes (Rat...
Forum: Obi Rope
Last Post: josemendez
23-07-2025, 01:43 PM
» Replies: 5
» Views: 320
|
|
|
TOUCH INPUT |
Posted by: swancollective - 27-05-2023, 12:24 PM - Forum: Obi Softbody
- Replies (1)
|
 |
Hey all,
I try to create the same behavior of the Particle Picker+Dragger (like in the Dragon sample scene) for a mobile app. But the touch input doesn't move the softbody.
How can I make it recognize my touch/finger pressing and dragging?
GPT-4 couldn't help me with this one!
|
|
|
bodyA on Solver_OnCollision yielding arbitrary index |
Posted by: michendo - 27-05-2023, 06:09 AM - Forum: Obi Cloth
- Replies (1)
|
 |
I am using Solver_OnCollision on CollisionEventHandler to discover colliding OBI bodies.
contact.bodyB provides the correct index = 2
However, contact.bodyA provides an arbitrary index of 352, which is well beyond the count of world.colliderHandles (there are 3).
Can you please advise? Code attached.
void Solver_OnCollision(object sender, Obi.ObiSolver.ObiCollisionEventArgs e)
{
var world = ObiColliderWorld.GetInstance();
// just iterate over all contacts in the current frame:
foreach (Oni.Contact contact in e.contacts)
{
// if this one is an actual collision:
if (contact.distance < 0.001f)
{
ObiColliderBase HitCollider = world.colliderHandles[contact.bodyB].owner;
if (HitCollider != null && HitCollider.gameObject.tag != "Tether")
{
Debug.Log("Body count = " + world.colliderHandles.Count); // returns 3
Debug.Log("bodyA = " + contact.bodyA); // returns 352
Debug.Log("bodyB = " + contact.bodyB); // returns 2
if (world.colliderHandles[contact.bodyB].owner != null)
{
Debug.Log(HitCollider.gameObject.name);
}
}
}
}
}
|
|
|
|