Other
Is it possible to use a lerp and a translate in the same time ?
Hi Everyone,
I would like to know if it's possible to use a lerp and a translate in the same time. Here is my problem : I have my object (A for exemple) and I use a transform.translate to move this object in the forward direction on the Z axis. My object must avoid another object (B for exemple) to his left and to avoid this object B, I use a lerp in a coroutine but the problem is that the object A continues to straight forward and when using the lerp to avoid the object B my object A rollbacks because the position on the axis Z is not updated.
The object A continues to forward during while the lerp is carried out what causes rollbacks.
To solve my problem, I need to do a diagonal move with the lerp and calculate or update the position of the object transform on the Z axis of my object A. But I have no idea if it's possible or not. So I tried some other solutions such as for example pre-calculating the position of the object A in Z in the lerp but here too, I don't know if it's possible because I tried but I failed.
I appreciate your help if you have any leads or ideas to help me :-)
Follow this Question
Related Questions
Tilting a camera around an object 0 Answers
Acces shader color and lerp 1 Answer
Help with recttransform lerp , lags on mobile not on pc. 1 Answer
Can you make the player do a 180° / u-turn when a button is pressed? 0 Answers
Rigid body vibrating? 0 Answers