Will someone please call a doctor? The main character is twitching on stage and nobody’s helping!
Jokes aside, I think the reason this might be happening is that you don’t check if the actor overshoots their target position, so on the next frame, they reverse direction and overshoot once again. I think you could solve this problem in the following way (at least, that’s how I tend to do it):
- Calculate the difference vector between character and target before movement.
- Move the character.
- Calculate the new difference vector.
- Take the dot product of both difference vectors. If the result is <0, the character has overshot their goal and their position can be set on top of the target position.
Anyway, nice to see another theatre themed game! Being the light technician was also on our idea list before we went for director instead.
The game definitely lacks polish, but considering this was your first Unity project and you only took 5 hours, this was pretty good! I’ve personally opened up Unity about two times and always noped out after about an hour, respectively, because I found it just way too intimidating, so getting something workable in 5 hours is something I find quite impressive. Nice job!