Converting www.text or string to rotation or position

How do you convert a string to a rotation (quat) or position (vector3) value?

Format: `var strQ:String = "(0,0,0,1)";` or `var strV:String="(1,3,5)";` ... how do you conver the strQ to a quaternion and the strV to a vector?

This is not a real answer, but it may helps anyway.

I had the same issue : I stored character position (Vector3) in my database, and I had hard time retrieving it. Finally, I find it easier to store float in my database for each value.

posperso is a Vector3 where is stored my position. For the form, I send it like that :

var posx : float = posperso.x;
var posy : float = posperso.y;
var posz : float = posperso.z;
var posxstr = posx.ToString();
var posystr = posy.ToString();
var poszstr = posz.ToString();

So, in my database, I have 3 fields instead of 1.

When retrieving these data, in my php code, I have just put a blank between the values.

Then, back in Unity again :

var tab : Array = new Array();
tab = formText.Split(" " [0]);
var posx : float = float.Parse(tab[0]);
var posy : float = float.Parse(tab[1]);
var posz : float = float.Parse(tab[2]);
posPerso.x =posx;
posPerso.y =posy;
posPerso.z =posz;

It all depends on how the string is presented. So you need to write something that converts your string to the needed type.

So without any information about how the string is presented, i cant give you an helpfull answer.