Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
multiple softbodys not interacting
#7
(17-12-2019, 04:21 PM)josemendez Wrote: Hi,

Simply create a new C#, copy and paste the code above. Replace the "<your force here>" with the force you want to apply, that's it. Here's the full copy-pastable code, made the force a public variable for convenience, so that you can change it in the editor:

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

public class Force : MonoBehaviour
{
   public ObiSoftbody softbody;
   public Vector3 force;

   public void FixedUpdate()
   {
       softbody.AddForce(force,ForceMode.Force);
   }
}

If you're aiming to develop games (or any program for that matter), learning how to code is a must, or at the very least having a programmer in the team who can do the job. You just can't rely on copy-pasting code you don't fully understand.
thanks for your help ( no luck getting my object to move yet, but will keep going), my aim is not to develop games,  mostly prototyping ( PlayMaker), Im a 3DS max artist ( motion design) of many years, and seeing the quality of what can be achieved in realtime is bringing me more and more to Unity....and the joys of zero rendering time and expense. thanks again.
Reply


Messages In This Thread
multiple softbodys not interacting - by Duncano - 17-12-2019, 01:12 PM
RE: multiple softbodys not interacting - by Duncano - 17-12-2019, 04:51 PM