Search Forums

(Advanced Search)

Latest Threads
How to dynamically change...
Forum: Obi Rope
Last Post: quent_1982
Yesterday, 11:29 AM
» Replies: 2
» Views: 75
Pipeline that bends
Forum: Obi Softbody
Last Post: josemendez
Yesterday, 09:52 AM
» Replies: 13
» Views: 762
How to implement/sync Obi...
Forum: Obi Rope
Last Post: quent_1982
01-07-2025, 01:48 PM
» Replies: 2
» Views: 168
Collisions don't work con...
Forum: Obi Rope
Last Post: chenji
27-06-2025, 03:05 AM
» Replies: 3
» Views: 235
Force Zone apply differen...
Forum: Obi Rope
Last Post: chenji
26-06-2025, 11:41 AM
» Replies: 11
» Views: 690
Can I blend in and out of...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 04:42 PM
» Replies: 3
» Views: 228
Using a rigidbody/collide...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 09:29 AM
» Replies: 1
» Views: 132
Solver is too performance...
Forum: Obi Rope
Last Post: quent_1982
20-06-2025, 08:09 AM
» Replies: 40
» Views: 4,168
Obi 7 Model Scaling
Forum: Obi Cloth
Last Post: alkis
19-06-2025, 02:37 PM
» Replies: 2
» Views: 246
Obi Softbody instability?
Forum: Obi Softbody
Last Post: Aroosh
18-06-2025, 06:35 PM
» Replies: 0
» Views: 127

 
  How easy it is to modify the softbody mesh during runtime?
Posted by: snowtv - 03-11-2021, 07:27 PM - Forum: Obi Softbody - Replies (2)

Lets say I have two cubes A and B, and I want to cut both A and B in half (the cutting plane is not pre-determined but is based on user input), then join half of A and half of B together.

What is the best approach to this kind of scenario?

Print this item

Pregunta Obi Solver OnCollision
Posted by: ProDea - 02-11-2021, 01:34 PM - Forum: Obi Fluid - Replies (4)

Hello everyone,

Is there any way to take particle color of collided fluid on OnCollision event?

Print this item

  Material property changes don't work with ObiCloth
Posted by: timconkling - 01-11-2021, 11:25 PM - Forum: Obi Cloth - Replies (7)

(I'm not sure if this is a bug, or an unsupported feature, or if I'm doing something wrong!)

  • We have a character in our game who wears a gown. The gown uses an Obi SkinnedCloth component for its cloth simulation.
  • If the character takes damage, the gown becomes "bloodied".
  • To do the bloody-gown effect, we're animating a property on its Material instance; a shader uses the property to do some color blending.
This all works properly when we use Unity cloth:

   

But when we use Obi cloth, changes to the gown Material's properties don't do anything:

   

(If we change the *master* Material's properties, we *can* get the bloody-gown effect to work with Obi - but of course, that means that all gowns share the "bloody" status.)

Why is this happening, and is there a way to solve it? Thanks!

Print this item

  How to save rope blueprint?
Posted by: linkinb - 01-11-2021, 12:06 PM - Forum: Obi Rope - Replies (1)

Hi,
I create ropes via script using the RopeBetweenTwoPoints.cs sample script.

Once the rope is generated, I want to be able to edit the blueprint to my liking and save the blueprint of the rope for future use.
The only problem is the blueprint is created using 
var blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();

Now I can edit the rope in playmode but since the blueprint is an instance it doesn't get saved. 
If I save the rope as a prefab the blueprint still dissapears. 
I know I can manually create blueprints and edit them in the editor, but I intend to create 20+ ropes and it would be tedious to manually create each new rope and blueprint.

How can I save a rope as a prefab/save the rope's blueprint after it has been generated and edited in playmode?

Print this item

  Collision position related to world
Posted by: Hoomann - 01-11-2021, 11:10 AM - Forum: Obi Rope - Replies (1)

Hi there
i just want to know the position of the particle that collides with another gameObject tagged with something.
i have read this page: http://obi.virtualmethodstudio.com/manua...ngcollider
but still couldn't manage to do it.
position variable given from code below doesn't seem to be related to world

// do something with the particle, for instance get its position:
var position = solver.positions[particleIndex];

Print this item

  drag the ball
Posted by: 0hsyn1 - 28-10-2021, 03:04 PM - Forum: Obi Softbody - Replies (4)

Hi, I have Ball(sphere) and it has soft body property. I want to click and drag with the mouse. 
Problem: it breaks down when it moves. 
Code inside top object:


Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;


[RequireComponent(typeof(Rigidbody))]
public class BallMove : MonoBehaviour
{
    const float speed = 500f;

    private Vector3 mOffset;
    private float mZCoord;
    private bool active;
    private Rigidbody rb;
    float startRotationY;

    void Awake()
    {
        startRotationY = transform.eulerAngles.y;
    }
    private void Start()
    {

        rb = GetComponent<Rigidbody>();

        Debug.Log(startRotationY);
    }

    private void OnMouseDown()
    {
       
        mZCoord = Camera.main.WorldToScreenPoint(
            gameObject.transform.position).z;
        mOffset = gameObject.transform.position - GetMouseAsWorldPoint();
        active = true;
        rb.velocity = Vector3.zero;
        rb.useGravity = false;
        rb.constraints -= RigidbodyConstraints.FreezeRotationZ;
    }

    private void OnMouseUp()
    {
        active = false;
        rb.useGravity = true;
        rb.velocity = Vector3.zero;
        rb.constraints &= ~RigidbodyConstraints.FreezeRotationZ;
    }

    private Vector3 GetMouseAsWorldPoint()
    {
        Vector3 mousePoint = Input.mousePosition;
        mousePoint.z = mZCoord;
        return Camera.main.ScreenToWorldPoint(mousePoint);
    }

    private void FixedUpdate()
    {
        if (active)
        {
            Vector3 desiredPosition = GetMouseAsWorldPoint() + mOffset;

            rb.velocity = Vector3.Distance(desiredPosition, rb.position) > 0.1f ? (desiredPosition - rb.position) * Time.fixedDeltaTime * speed : Vector3.zero;
        }
        transform.eulerAngles = new Vector3(0, startRotationY, transform.eulerAngles.z);
    }

    private void Update()
    {
        transform.position = new Vector3(transform.position.x, transform.position.y, 0);
    }
}



Attached Files Thumbnail(s)
           
Print this item

  obi rope generating
Posted by: Hoomann - 28-10-2021, 11:32 AM - Forum: Obi Rope - Replies (4)

hi there..my character runs forward and each time it hits something a rope will be generated connecting from character to it and as you go forward the length should increase.
1- since level length is increasing is there going to be a decrease in performance since you may get multiple ropes and they're all getting longer?
2- when rope is generated for a moment it seems it's initial length is too much for a short distance between character and object, is there a way to shorten initial length of the rope?



Attached Files Thumbnail(s)
   
Print this item

  Attachment not work
Posted by: OsirisDev - 27-10-2021, 04:47 PM - Forum: Obi Cloth - Replies (5)

I have a problem I can't understand the reason, I have 2 cloaks of different types, I added Static groups in both to attach with it to the parent character, it works only in the first case.
https://ibb.co/YyS5WKb

https://ibb.co/6tBL0fP

Print this item

  Add a ragdoll attachment to the rope's end
Posted by: lacasrac - 27-10-2021, 10:46 AM - Forum: Obi Rope - Replies (11)

I have a ragdoll but when I attaching to my rope's end, the ragdoll just falling down.
Can I attach it? How?

I need to my character hanging on the last rope's segment. Basically I want to attach one of his body part to the rope's end.
Let's say: neck, or just the "2 foot" or "2 hand".

Can you help me in this?

Print this item

Triste How to simulate Planet gravity
Posted by: wushuaiqi - 27-10-2021, 10:28 AM - Forum: General - Replies (9)

hi I want to know how to simulate Planet gravity
my idea is
change gravity direction point to planet position in update()
The direction calculation formula is
Vector3 dir=(solver.position(box center)-planet.position).normalized
so i want to know how to get solver center position or gravity set position

Or there are other solutions




Thank you for your help

Print this item