maybe substep is the right option, i had to do this with unreal engine in the past to make it behave. how would i add force from another script in substep?
perhaps i need to explain what i am doing
i am attempting to create essentially a hover vehicle using raycast suspension. the raycast starts from a particle on each corner and applies upwards force to the corner particles.
the technique works fine with unity's rigid body but produces 'jiggle' on the softbody. it is fighting the external forces.
i copied the code from AddForce() but apply it to a single particle like this
Code:
body.solver.externalForces[particleindex] += suspensionForce / body.solver.invMasses[particleindex];
it is very close to working properly
edit:
this works. thanks for the help
Code:
void Actor_OnPreSolverStep(ObiActor actor, float stepTime)
{
actor.solver.externalForces[particleindex] += suspensionForce / actor.solver.invMasses[particleindex];
}