Hi,
I have some words I want to place in my scene.
Each word has to be touchable so I want to use individual textObjects.
I thought I could autospace them by using some math. But I found out my math sucks.
What I am doing is taking the x position of word1 (100) add its width (55) and then add 10 to that number to space it a bit from the word.
This should work if the xReference is 0, but it doesn’t. So I tried dividing the width by 50% but still not spacing correctly.
Any ideas on how I could achieve this?
[lua]
local word1=newText(group,“Foobar”)
word1.x=myWidth*0.25
word1.y=myHeight*0.92
local word2=newText(group,“barFoo”)
woord2.x=(word1.x + (word1.width/2)+10) – if the center point for text is in the middle else without the /2
woord2.y=myHeight*0.92
[/lua]