GetSegmentPercentTangent() Simulation?
Posted: Wed Jun 16, 2010 6:24 pm
Hello, I'm still a little amazed about the new curve scripting interface functions that have been added to the new AS version cause, preciselly, I was trying to develop a little embedded script to provide a good bone path following solution and, before this functions exists (specially the "GetPercentTangent()" one), get the real-time response for the bones orientation that I wanted was simply impossible...
But as I said, looking into the new API, I discovered all this new encouraging stuff:
CurveLength() --The length of a certain curve.
SegmentLength(i) --The length of a given segment.
GetPercentLocation(0-1) --Given a percentage, returns a location along the ENTIRE curve.
GetPercentTangent(0-1) --Given a percentage, get the orientation over certain point of the ENTIRE curve.
GetSegmentRange(i, ?, ?) --Not totally sure how to use the returned value yet, but sounds interesting...
And well, some of that functions simply changes all
, cause they provide the necessary to get total path following with the real-time bone orientation that I was not able to get before... BUT!
...As always, I have an intricate problem
, cause I want to get the tangent be not based in the ENTIRE curve percentage but in the each segments percentage (that is how the translation of the bone is deliberately calculated in my tries (instead using the GetPercentLocation())), to can avoid that the path follower bone rotates inadequately when any of the points of the curve is moved (due to the length of the curve changes).
So... well, maybe I'm complicating things too much but all is for a good reason (for my POV), cause the system I propose it seems to me more practical, controllable and dynamical/adjustable (among other things). Well, now the questions:
Do you think could be a mathematical way to give to the "GetPercentTangent()" a segment percentage instead a curve one and can compensate the curve length variations (caused by NOT adjacent points movement during animation) to avoid that unwanted rotations? I mean, now it's possible to get the entire curve length and the segments length, so I'm almost sure that there must be a way to compensate/counteract this behavior that I simply can't see due to limited mathematical skills
PS: I'd like be wrong, but as I consider the possibility that nothing could have been understood due to the fatal combination of my english and my "maths", hmmm... I'm thinking if my only hope could be have called the Genete's attention to can treat with him/you? all this issue in plain spanglish, couldría? couldría?
But as I said, looking into the new API, I discovered all this new encouraging stuff:
CurveLength() --The length of a certain curve.
SegmentLength(i) --The length of a given segment.
GetPercentLocation(0-1) --Given a percentage, returns a location along the ENTIRE curve.
GetPercentTangent(0-1) --Given a percentage, get the orientation over certain point of the ENTIRE curve.
GetSegmentRange(i, ?, ?) --Not totally sure how to use the returned value yet, but sounds interesting...
And well, some of that functions simply changes all

...As always, I have an intricate problem

So... well, maybe I'm complicating things too much but all is for a good reason (for my POV), cause the system I propose it seems to me more practical, controllable and dynamical/adjustable (among other things). Well, now the questions:
Do you think could be a mathematical way to give to the "GetPercentTangent()" a segment percentage instead a curve one and can compensate the curve length variations (caused by NOT adjacent points movement during animation) to avoid that unwanted rotations? I mean, now it's possible to get the entire curve length and the segments length, so I'm almost sure that there must be a way to compensate/counteract this behavior that I simply can't see due to limited mathematical skills

PS: I'd like be wrong, but as I consider the possibility that nothing could have been understood due to the fatal combination of my english and my "maths", hmmm... I'm thinking if my only hope could be have called the Genete's attention to can treat with him/you? all this issue in plain spanglish, couldría? couldría?
