Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Koosmono

Pages: [1]
1
Support / Need help with Word Wrap in text mesh
« on: January 19, 2013, 05:16:10 am »
I'm having trouble getting the word wrap width option to work correctly. When I adjust the properties this way and look in the editor while the game is running, the proper number appears in the word wrap field and the formatting box is checked. Am I not  understanding something correctly? My thinking was that the width was a number of characters the string would display before moving to a new line where it would repeat that process.

I am looking to have the text appear on multiple lines and so far I can't find anyway to do so in code.

Thank you for any help. It will be very much appreciated.

Code: [Select]
public void Awake()
{
textMesh = GetComponent<tk2dTextMesh>();

textMesh.formatting = true;

textMesh.wordWrapWidth = 15;

textMesh.Commit();

textIndex = 0;

_TypedStates = typedStates.waitingToBeTyped;
}

public void UpdateText(float GameTime)
{
if(_TypedStates == typedStates.Typing)
{
if(GameTime > lastUpdateTime + textTypeSpeed)
{
textMesh.text = fullString.Substring(0, textIndex);

lastUpdateTime = GameTime;

textMesh.Commit();

if(textIndex >= fullString.Length)
_TypedStates = typedStates.FinishedTyping;
else
textIndex++;
}
}
}

2
Support / Re: Box Collider with Character Controller
« on: March 07, 2012, 05:37:46 pm »
I found another solution which seems to be working so far. I lowered the default levels of the "Step Offset" and "Skin Width" fields in the character controller and now everything works fine.

I'll also take a look at your solution Unikron, I just thought I would post what I found since it seems to be another fix to the problem.

Thanks!

3
Support / Box Collider with Character Controller
« on: March 07, 2012, 06:05:08 am »
I can't seem to find anyone else with this problem so far, so I figured I'd post about it.

My problem is I can't seem to get sprites from 2D toolkit to work properly with the character controller.

I set the sprite collection that I am using for my character to have no box collider. Then I add the character controller and a small script for moving and jumping (from the Unity Reference), which adds its own box collider.

It has a sphere shape with edges that are just on the edge of the sprite, but when I test the game, the sprite will sit a good distance above the platforms. It also collides with other box colliders when it shouldn't, i.e. it won't properly go under elevated platforms, it will hit them from below etc. and no matter how small I make the controller sphere, the collisions are still messed up.

Was wondering if anyone else ran into this problem. The character controller is very helpful, so if I can find a way to use it with 2D toolkit I would be extremely happy. There just seems to be a problem with the box collider it adds to the sprite.

Thanks for any help

Pages: [1]