rotation broken with text objects

Hi Guys

I’m running into a funny problem, whenever i apply a oration property to a text object the object disappears from screen, no matter what angle i place. tried several reference points with no success. Can anyone confirm having this issue as well? I’m using the latest build. Thanks

Cheers [import]uid: 13504 topic_id: 22136 reply_id: 322136[/import]

It seems fine for me (daily build 750). Try both textObject.rotation = 180 and textObject:rotate(180) perhaps?

Otherwise, if possible you might be better off anyways storing the text as an image. Text has certainly been known to be a little wonky with Corona, from time to time. [import]uid: 87138 topic_id: 22136 reply_id: 87985[/import]

Hi Revaerie

Thanks for your reply, going in 90 degrees increments works, but anywhere in between doesn’t. in both methods. Can you confirm with 15 degrees from your end?

Cheers
[import]uid: 13504 topic_id: 22136 reply_id: 87992[/import]

FWIW I even tried 2365.904 degrees. What function are you using to create the text with? I tried display.newText, newRetinaText, and newEmbossedText and they all seemed to work. [import]uid: 87138 topic_id: 22136 reply_id: 88007[/import]

Can you post code for your text, please? Happy to check this out. :slight_smile: [import]uid: 52491 topic_id: 22136 reply_id: 88013[/import]

Works for me too ( build 750 ), tried using this code

[lua]local _W = display.contentWidth
local _H = display.contentHeight

local text = display.newText( “here is some text”, 0, 0, native.systemFont, 30 )
text.x = _W * 0.5
text.y = _H * 0.5
text.rotation = 15

function enterFrame( )
text.rotation = text.rotation + 15
end
Runtime:addEventListener( “enterFrame”, enterFrame )[/lua]

[import]uid: 114118 topic_id: 22136 reply_id: 88014[/import]

Hi Guys

Thanks for the reply, Abiz the code you supplied, it doesn’t work for me, only in 90 degrees increment it does, so it disappears for most of the time and only shows at 90 degrees increments only.

Here is the code that I’m using:

[lua]display.setStatusBar(display.HiddenStatusBar);

_W = display.contentWidth;
_H = display.contentHeight;

local monster = display.newText(“a”, 0, 0, “Monsterz”, 120*2);
monster.xScale = 0.5; monster.yScale = 0.5;
monster:setReferencePoint(display.CenterReferencePoint);
monster.x = _W * 0.5; monster.y = _H * 0.5;

local hello = display.newText(“Tap me, I’z hungree”, 0, 0, “BorisBlackBloxx”, 24*2);
hello.xScale = 0.5; hello.yScale = 0.5;
hello:setReferencePoint(display.CenterReferencePoint);
hello.x = _W * 0.5; hello.y = (_H * 0.5) + 80;

local nom = display.newText(“Nom Nom”, 0, 0, “BorisBlackBloxxDirty”, 12*2);
nom.xScale = 0.5; nom.yScale = 0.5;
nom:setReferencePoint(display.CenterReferencePoint);
nom.x = monster.x + 60; nom.y = monster.y;
nom.rotation = 45;
nom.isVisible = false;

function monster:touch(event)

local chomp = {“a”, “A”, “S”, “S”, “T”, “T”, “T”, “S”, “A”, “a”, “A”, “S”, “S”, “T”, “T”, “T”, “S”, “A”, “a”};

if(event.phase == “ended” or event.phase == “cancelled”) then

local function nomnom(event)
if(event.count == 1) then
– This is the first time the timer runs
nom.isVisible = true;
end

monster.text = chomp[event.count % #chomp + 1];

if(event.count == #chomp) then
– This is the last time the timer runs
nom.isVisible = false;
timer.cancel(self.timer);
self.timer = nil;

end
end

self.timer = timer.performWithDelay(30, nomnom, #chomp);
end
end

monster:addEventListener(“touch”, monster);[/lua] [import]uid: 13504 topic_id: 22136 reply_id: 88057[/import]

Ohh and I’m using build 750 as well, so why would my version be screwed up?! Support?! [import]uid: 13504 topic_id: 22136 reply_id: 88059[/import]

If that Abiz’s code is still failing on your machine can you please submit a bug report and be sure to include details about what operating system you are running?

Thanks,
Peach :slight_smile: [import]uid: 52491 topic_id: 22136 reply_id: 88109[/import]

Hi Peach

I was able to sort off figure out what was causing the problem, it’s the build.settings

[lua]settings = {
iphone = {
plist = {
UIAppFonts = {
“monsterz.ttf”,
“BorisBlackBloxx.ttf”,
“BorisBlackBoxxDirty.ttf”
}
},
},
}[/lua]

not sure if my code is outdated and there is a better way of writing that, going to have to do some tests today on this, one thing for sure though, even if use system fonts, if the above file is present then the problem is present.

Cheers
[import]uid: 13504 topic_id: 22136 reply_id: 88196[/import]

Ok, So making the code the following doesn’t help as well:

[lua]settings =
{
iphone =
{
plist =
{
UIAppFonts = “monsterz.ttf,BorisBlackBloxx.ttf”
},
},

}[/lua]

I guess now we can call it a Bug :slight_smile:

Cheers [import]uid: 13504 topic_id: 22136 reply_id: 88198[/import]

OK so just to confirm, you got this issue running Aviz’s code too, right? Not only when rotating a custom font text object?

If you file a bug please throw in a sample to reproduce, we can get it looked at.

Peach :slight_smile: [import]uid: 52491 topic_id: 22136 reply_id: 88275[/import]

PS - The first way is correct for requiring custom fonts, the second is a long string saying the font name is; “monsterz.ttf,BorisBlackBloxx.ttf”. [import]uid: 52491 topic_id: 22136 reply_id: 88276[/import]

Hi Peach

Yes the bug happens with Abiz’s code. I uploaded a sample code to the bug section along with instruction.

Cheer
[import]uid: 13504 topic_id: 22136 reply_id: 88308[/import]

Very strange - thanks for the bug report, hopefully we can get it figured out quickly. [import]uid: 52491 topic_id: 22136 reply_id: 88320[/import]

As far as i remember this happens if you have

antialias = true,  

In your config.lua file. Set it to false and the problem should go away [import]uid: 84637 topic_id: 22136 reply_id: 88343[/import]

Excellent Danny, confirmed. so it’s an Antialias problem. still can’t figure out why it only happens when you use custom fonts settings? Thanks mate

So how can i update the debug case?

Cheers [import]uid: 13504 topic_id: 22136 reply_id: 88344[/import]

No problem.

If you filed a bug already you can respond to the case with the updated information. Or alternatively you can give me the bug number (case) and i will update it for you [import]uid: 84637 topic_id: 22136 reply_id: 88345[/import]

Hi Danny

Where is the tracking system for bugs?! Here is the case number is 12366, thanks

Cheers [import]uid: 13504 topic_id: 22136 reply_id: 88364[/import]

Iv’e updated your case with the relevant info.

Generally when you submit a bug you receive an email. To reply/add additional info you simply reply back to the email you received. [import]uid: 84637 topic_id: 22136 reply_id: 88374[/import]