I am working on a game that has words as obstacles, i.e. the player needs to climb over and around them. There will be hundreds of words in the game therefore I need a way to automate the placement. I figured out how to create an object with a TextMesh in Unity but I can't figure out how to automatically generate a collider so that I can have the player interact with it. I know that there is a way to edit the verticies of Edge and Polygon colliders but I don't have a source for editing them. What would be useful is a getPoints method of the TextRender but it seems like there is no way to get that. Am I going about this the right way? Thanks in advance.
\$\begingroup\$
\$\endgroup\$
4
-
\$\begingroup\$ I cant seem to find this TextRenderer. Do you mean Text Mesh ? Please share your code where you generate the words. \$\endgroup\$Uri Popov– Uri Popov2016-05-18 07:47:15 +00:00Commented May 18, 2016 at 7:47
-
\$\begingroup\$ Yes I did, I just edited the post to fix that. I don't have any code for generation yet, right now I'm working on just creating any text with a fitted collider attached. \$\endgroup\$thequantumguy01– thequantumguy012016-05-18 11:28:39 +00:00Commented May 18, 2016 at 11:28
-
\$\begingroup\$ so why doesn't attaching a box collider work? Or do you require more precision than the humble box collider ? \$\endgroup\$Uri Popov– Uri Popov2016-05-18 11:31:57 +00:00Commented May 18, 2016 at 11:31
-
\$\begingroup\$ I require more precision. I need the player to be able to interact with each part of each letter. \$\endgroup\$thequantumguy01– thequantumguy012016-05-18 11:46:03 +00:00Commented May 18, 2016 at 11:46
Add a comment
|