Hey everyone, I have a project for school where parts of an object come flying in from different parts of a screen into the center to form a car. We aren’t allowed to use if statements either. I know how to code it so the parts go flying out, but is there any way to reverse my code or the draw function to make it so that the parts come flying in?
It would help a lot if we could see the code you have until now, to understand what to reverse . But for actually reversing draw, there is no thing like that. As for the code, you could probably just reverse some numbers and it should do pretty much that, depending on how your code looks/works.
Thanks! just wanted to clarify if such a thing existed.
This is… strange. Can you share more details from the actual assignment?
Use lerp (or map):
Given a progress level a, then you find a position x for the flying part. Then you can input a stream of progress 0.1, 0.2, 0.3 … 0.9, 1.0 and the part will fly out. Or, you can input a stream of progress 1.0, 0.9, 0.8 … 0.1, 0.0 and the part will fly in.