|
|
Unknown CPU architecture |
Posted by: Lisboa - 30-01-2019, 02:19 PM - Forum: General
- No Replies
|
 |
Hi,
Im using Obi Fluid 4.0 and Unity 2018.3.3f1 and this error appears when I try to create a build:
Exception: Unknown CPU architecture for library Assets/Obi/Plugins/iOS/libOni.a
UnityEditor.Android.PostProcessor.Tasks.NativePlugins.ProcessPlugin (UnityEditor.Android.PostProcessor.PostProcessorContext context, System.String pluginPath, System.String pluginTargetCPU)
UnityEditor.Android.PostProcessor.Tasks.NativePlugins.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installP
Can someone help me?
|
|
|
ObiRope 2D + threaded rings |
Posted by: oraspec - 28-01-2019, 07:47 PM - Forum: Obi Rope
- Replies (1)
|
 |
Hi guys,
I am looking for a solution to have 2D thread with rings on it. Rings should not be attached to specific particle. It should move on a thread back and forth influenced by real physics/gravity. Can you advise whether it is possible to realize it with ObiRope for 2D without programming the threaded rings physics?
Thanks in advance.
|
|
|
Instantiate Rope during Runtime |
Posted by: crychair - 28-01-2019, 05:02 PM - Forum: Obi Rope
- Replies (3)
|
 |
Code: public void makeRope(Vector3 pos1, Vector3 pos2, GameObject obj1, GameObject obj2) {
GameObject rope = Instantiate(obiRopePrefab);
BetterRopeHelper helper = rope.GetComponent<BetterRopeHelper>();
helper.SetPoints(pos1, pos2);
helper.GenerateRope(obj1, obj2);
}
Code: using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Obi;
[RequireComponent(typeof(ObiRope))]
[RequireComponent(typeof(ObiCatmullRomCurve))]
public class BetterRopeHelper : MonoBehaviour
{
public ObiSolver solver;
public ObiRopeSection section;
public Material material;
private ObiActor actor;
private ObiRope rope;
private ObiCatmullRomCurve path;
private Vector3 start, end;
public void SetPoints(Vector3 startpoint, Vector3 endpoint)
{
// Get all needed components and interconnect them:
rope = GetComponent<ObiRope>();
path = GetComponent<ObiCatmullRomCurve>();
rope.Solver = solver;
rope.ropePath = path;
rope.section = section;
GetComponent<MeshRenderer>().material = material;
// Calculate rope start/end and direction in local space:
start = startpoint;
end = endpoint;
Vector3 localStart = startpoint;
Vector3 localEnd = endpoint;
Vector3 direction = (localEnd - localStart).normalized;
// Generate rope path:
path.controlPoints.Clear();
path.controlPoints.Add(localStart - direction);
path.controlPoints.Add(localStart);
path.controlPoints.Add(localEnd);
path.controlPoints.Add(localEnd + direction);
}
public void GenerateRope(GameObject obj1, GameObject obj2)
{
// Setup the simulation:
StartCoroutine(Setup(obj1, obj2));
}
IEnumerator Setup(GameObject obj1, GameObject obj2)
{
// Generate particles and add them to solver:
yield return StartCoroutine(rope.GeneratePhysicRepresentationForMesh());
rope.AddToSolver(null);
// Fix first and last particle in place:
//rope.invMasses[0] = 0;
//rope.invMasses[rope.UsedParticles - 1] = 0;
//Oni.SetParticleInverseMasses(solver.OniSolver, new float[] { 0 }, 1, rope.particleIndices[0]);
//Oni.SetParticleInverseMasses(solver.OniSolver, new float[] { 0 }, 1, rope.particleIndices[rope.UsedParticles - 1]);
//rope.PushDataToSolver(ParticleData.INV_MASSES);
//batchConstraints = pinConstraints.GetBatches() as ObiPinConstraintBatch;
//pinConstraints.RemoveFromSolver(null);
//Debug.Log(obj1.name);
//batchConstraints.AddConstraint(0, obj1.GetComponent<ObiCollider>(), Vector3.zero, 0f);
//batchConstraints.AddConstraint(rope.UsedParticles - 1, obj2.GetComponent<ObiCollider>(), Vector3.zero, 0f);
//pinConstraints.AddToSolver(null);
//pinConstraints.PushDataToSolver();
rope.PinConstraints.RemoveFromSolver(null);
ObiPinConstraintBatch batch = (ObiPinConstraintBatch)rope.PinConstraints.GetFirstBatch();
Vector3 offset1 = obj1.transform.InverseTransformPoint(start);
Vector3 offset2 = obj1.transform.InverseTransformPoint(start);
batch.AddConstraint(0, obj1.GetComponent<ObiCollider>(), offset1, 1f);
batch.AddConstraint(rope.UsedParticles - 1, obj2.GetComponent<ObiCollider>(), offset2, 1f);
rope.PinConstraints.AddToSolver(null);
//actor.enabled = true;
}
}
I have the method and helper above and it works. My issue is that I want the rope to be taught on instantiation rather than modifying it after. Is there some way to do this. currently when the rope is generated it become slack and weighs itself down.
Any help is appreciated.
|
|
|
|