|
|
ObiEmitterShapeImage |
Posted by: p3gamer - 21-11-2018, 05:36 PM - Forum: Obi Fluid
- Replies (1)
|
|
Can you explain how the ObiEmitterShapeImage class works? I thought that this component would take the shape of a 2d image (ie. coffee mug) and create an emitter shape based off it. When I tried to add this component, it didn't work properly (only one fluid drop came out).
Is there any downside to adding multiple emitter shapes to each emitter? Creating a custom emitter shape seems tricky (ie. lightning bolt shape, tree leaf).
|
|
|
Fluid collision issues |
Posted by: george_playbite - 20-11-2018, 09:38 PM - Forum: Obi Fluid
- No Replies
|
|
Hello there,
I'm having some issues with fluid collision detection and I'm not sure how to resolve them.
Here's a video:
https://drive.google.com/file/d/1040FPuI...sp=sharing
As you can see in the video, the issue is that the fluid goes through my colliders quite easily.
I tried using the Thickness property in the Obi Collider component but even though that helps, the gap between the fluid and the collider makes it look really strange and also some jittering occurs because the colliders now overlap each other.
I'm rotating my object by using Rigidbody.MoveRotation and not directly modifying the transform, in an effort to reduce issues with physics/transform not being in sync.
Also this object has an invisible collider on top so that the fluid doesn't overflow and fall off when moving around.
Any suggestions/ideas would be very appreciated.
Thanks!
George
|
|
|
Underwater rope |
Posted by: ibbybn - 18-11-2018, 04:31 PM - Forum: Obi Rope
- Replies (5)
|
|
Hey, I'm using obirope to tether a spear to a harpoon which you can reel back after shooting it.
If I'm using very low iteration/substep numbers the rope already looks like it's underwater but becomes way too stretchy.
If I use higher numbers the simulation is too fast to look realistic underwater.
Is there a way to get this slow motion underwater look without sacrificing stiffness of the rope?
Is this something I might be able to do with the new release or is it already doable?
|
|
|
Counting Fluid & Android Export |
Posted by: Tuna.Y - 15-11-2018, 06:39 PM - Forum: Obi Fluid
- Replies (11)
|
|
Hi All,
I bought this asset a few days ago and everything was going well until I tried to count particles
I know this page: http://obi.virtualmethodstudio.com/tutor...sions.html and spent time there but I couldn't manage to "count" particles. It would be amazing if someone give hand about that.
I have my box collider and script on my Solver object. There is a counter in the script, but it counts as soon as 1 collision happens BETWEEN the fluid particles (not the collider) and it never stops increasing.
Here is my code;
Code: using Obi;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(ObiSolver))]
public class Fill : MonoBehaviour
{
ObiSolver solver;
public int counter = 0;
public Collider2D targetCollider = null;
ObiSolver.ObiCollisionEventArgs collisionEvent;
void Awake()
{
solver = GetComponent<ObiSolver>();
}
void OnEnable()
{
solver.OnCollision += Solver_OnCollision;
}
void OnDisable()
{
solver.OnCollision -= Solver_OnCollision;
}
void Solver_OnCollision(object sender, ObiSolver.ObiCollisionEventArgs e)
{
foreach (Oni.Contact contact in e.contacts)
{
// this one is an actual collision:
if (contact.distance < 0.01)
{
Component collider;
if (ObiCollider.idToCollider.TryGetValue(contact.other, out collider))
{
counter++;
}
}
}
}
}
Second thing is, I only see pink screen when I export my game to the Android. I found a similar issue on the forum, did the suggestion (It was something like changing current shader to simple shader) and it didn't work.
Thanks in advance.
|
|
|
|