Hello,
So my problem is quite simple but I can’t find a way to correct it.
Basically I have an animation that stop when it overlap something and continue when there is no overlap anymore.
I have a float that can goes from 0 to 100, it represent the position of the object in the animation, the object can move from 0 to 100 to 0 to 50 to 0 to… basically it can goes and stop at any value.
Most of the time it has to go from 0 to 100 but interp to makes it move very fast at first and very slow when there is not much distance anymore.
The problem with this is when I have two close overlap, it doesn’t look smooth at all.
For example the object overlap at 10 and there will be an other one at 12. So when the first overlap ends, it basically teleport to around 17-18 making it looks not smooth at all and not even be at the correct position.
The problem disapear when the two overlap are at around 80-82 and more.
The problem also disapear at 79 and less if I make reinterp to slower but it has to be incredibly slow and it’s not what I want to do.
What I want is to make the movement constant and not too fast so this problem doesn’t happen.
I think interp to is simply teleporting to a certain percentage of the distance left which is exactly what I was doing before learning about interp to with similar results.
Also some precision, when it’s at 10 and there will be an other overlap at 12, I can’t know about it so I always have to set the goal to 100. So I know I will never have a very smooth movement this way but at least it shouldn’t goes further than 12 or 13 and moves a bit slower. Also the movement is around 20cm from 0 to 100.
So any idea how I could make this smoother?
Other question I just thought about while writing this, any way of detecting an overlap or collision before it happens? The animation is a rotation so I guess it’s maybe not that simple. That way I could set the goal to 12 instead of 100 and have a better movement.