I'm trying to store a velocity vector declared as this:
me.vel = [0, 0, 0];
into a MySQL database. I assume this needs to be converted into a string before it can be stored, but that's because I don't know of any appropriate type to store it as, ex: VARCHAR, INT, STRING, etc. (If it can be stored let me know which type as this would be a simpler solution and I wouldn't have to convert into a string then back to a vector)
I've tried:
var velocityString = me.vel.join();
var velocityString = String(me.vel);
but those don't seem to work.
How can I convert this array into a string?
Thanks, Digimas
Or you could json encode the object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With