Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Instantiate from Prefab - Each end into position
#4
(16-06-2018, 03:03 AM)Jerth Wrote: You're right. The HELPER script was not as intimidating as I thought, and quite elegant. Thanks josemendez.

Corazón

A new problem I'm running into is that I crash my Unity (and computer lol) when I try to use an OFFSET on my constraints  Huh


Code:
constraintsBatch.AddConstraint(rope.UsedParticles - 1, targetCube.GetComponent<ObiCollider>(), Vector3.zero, 0f);


That works fine but if I replace "Vector3.zero" with a calculated offset... BAM.
Any tips off the bat??

The offset is expressed in the collider's local space. Make sure you're not passing a world space value, as it might be extremely large, causing huge torques to develop. Anyway, in 3.4 and up large torques/velocities should not cause a crash.
Reply


Messages In This Thread
RE: Instantiate from Prefab - Each end into position - by josemendez - 16-06-2018, 12:00 PM