x


Convert String to Vector Type

I am trying to read XML which contains a tag for player position of type Vector3. Cant find how to convert String to Vector3

more ▼

asked May 18 '12 at 07:31 AM

Humb gravatar image

Humb
36 9 19 25

How is the string formatted? Obviously you need to use some kind of parse method, but it depends entirely on the format of the original string.

May 18 '12 at 08:20 AM syclamoth

It also depends on how you read / parse your xml data. Do you use any xml library?

It would also help to actually post the piece of xml which shows your format.

Personally i would encode a Vector3 like this:

<Vector3 x="10" y="20" z="30" />

Feel free to edit your question.

May 18 '12 at 08:42 AM Bunny83
(comments are locked)
10|3000 characters needed characters left

1 answer: sort newest

well found d answer . can happen by first converting string to float

more ▼

answered May 24 '12 at 06:57 AM

Humb gravatar image

Humb
36 9 19 25

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x225
x7

asked: May 18 '12 at 07:31 AM

Seen: 755 times

Last Updated: May 24 '12 at 06:57 AM