- Home /
Autotyping dialogue text: words at end of line jumping to next line halfway through being typed and it looks ugly
Hello everyone,
I just finished making an auto-typing dialogue text box system using a coroutine that takes the string to be typed into the UI text field and loops through the string adding one letter at a time with a tiny delay in between each loop iteration to give the impression of auto-typing/scrolling text. It's pretty standard stuff and is working fine right now for what it is.
My only issue is that if it's typing out a string that's a short paragraph with several lines within the text box and a long word in the string being typed out falls at the end of a line but doesn't quite fit, the characters will begin being typed at the end of the line, but then when the full word doesn't fit in the space of the text box, the partial word jumps to the next line and finishes getting typed there. The words jumping from the end of one line to the beginning of the next as they are typed out is a small subtle thing, but it's driving me crazy and I think it looks bad.
I'm trying to figure out how to fix this but for the life of me I can't come up with a solution. I tried splitting the string into individual words instead of letters and slightly increased the delay time between writing out each word which gets rid of the jump problem, but having the function write out the paragraph word by word instead of letter by letter looks much worse and more clunky and I wasn't happy with that as a solution when I implemented it. All tutorials I've searched for involving auto-typing dialogue boxes have failed me and I couldn't find anything from hours of google searches. Do any of you have any ideas on how to get around this annoying word jump while still maintaining the auto-type text effect? Any ideas on how to approach this would be superbly appreciated.
Here's a gif showing what I mean, with the issue I'm trying to figure out how to fix happening on the words TELEPORTATION and WITHOUT
Did you ever figure this out? I'm having the same problem.
Your answer
Follow this Question
Related Questions
string problem 2 Answers
Dialogue strategy? 0 Answers
How to make dialog window? 1 Answer
VR RPG like dialogue system 1 Answer
Dialouge isnt working 1 Answer