Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  problem with changing distance constraints parameters through script
#1
hi, i been trying to make a grapple hook similar to the included one in the package,when i shoot the hook game object and it sticks to other objects i need the robe to be much less stretchy.im using a simple script to control the prematers of distance constraints ,it works fine and it changes the parameters correctly .the problem is , it only changes the numbers .the real changes only going to be applied when i insert the numbers to obi solver manually.
how do i change the distance parameters like iteration and relaxation by script and see it actually happen in the play mode?
and here is the code:

public void less stretch()
    {
        obiRopi.GetComponent<ObiSolver>().distanceConstraintParameters.iterations = 38;
        obiRopi.GetComponent<ObiSolver>().distanceConstraintParameters.SORFactor = 1.5f;
        
        
    }
Reply


Messages In This Thread
problem with changing distance constraints parameters through script - by h00man - 20-08-2018, 10:10 AM