Web Toolbar by Wibiya

Removing MovableText


A place to ask questions or discuss issues relating to implementing applications with Axiom. If you are unsure of where to post, post here.

Regular

Posts: 46

Joined: Tue Dec 01, 2009 5:55 pm

Location: United States

Post Wed Oct 20, 2010 6:03 pm

Removing MovableText

What's the correct way to remove a MovableText object? The following throws an exception:
  Code:
var movableText = new MovableText("Test", "Test", "BlueHighway", 300, ColorEx.White);
movableText.SetTextAlignment(MovableText.HorizontalAlignment.Center, MovableText.VerticalAlignment.Above);
this.sceneManager.DestroyMovableObject(movableText);

Digging it looks like the exception has to do with the fact that MovableType is null and if I manually set the property the scene manager cannot find an associated object in its map and throws another exception. I'm not sure if this is a bug or I'm not doing it properly.

Team Member
Team Member

Posts: 213

Joined: Tue Nov 17, 2009 1:56 pm

Post Fri Oct 22, 2010 12:28 am

Re: Removing MovableText

I can't answer whether it's a bug, or something you're doing wrong. However, If this is holding you back, rather than waiting on a fix, I have a suggestion.
Check out this snippet here. It's about using Billboards for MovableText. It's in C#, but it's not Axiom specific so a few changes do need to be made.
I was actually going to convert it myself, I'll let you know on any progress I make.

Regular

Posts: 46

Joined: Tue Dec 01, 2009 5:55 pm

Location: United States

Post Sat Oct 23, 2010 6:50 am

Re: Removing MovableText

Thanks for the reply DoubleA, that solution looks interesting.

Contributor
Contributor

Posts: 852

Joined: Wed Mar 22, 2006 8:06 pm

Post Sat Oct 23, 2010 7:02 am

Re: Removing MovableText

I think the problem is that there's no MovableObjectFactory factory for MovableText, so the bug is most probably in a missing SceneManager.CreateMovableText(). Ticket
User avatar

Team Member
Team Member

Posts: 1588

Joined: Thu Mar 02, 2006 11:29 pm

Location: Boston, MA, USA

Post Mon Nov 08, 2010 2:01 pm

Re: Removing MovableText  Topic is solved

This should be all corrected in changeset:2317, please review and provide any feedback.
Borrillis
The Steward of Axiom

Regular

Posts: 46

Joined: Tue Dec 01, 2009 5:55 pm

Location: United States

Post Mon Nov 08, 2010 9:32 pm

Re: Removing MovableText

Borrillis wrote:This should be all corrected in changeset:2317, please review and provide any feedback.

Works great, thanks.

Return to General Q & A

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.