playMaker

Author Topic: Convert Vector3 to String  (Read 7685 times)

markinjapan

  • Full Member
  • ***
  • Posts: 103
Convert Vector3 to String
« on: October 02, 2011, 08:42:08 PM »
As a way of debugging my game I need to display Vector3 via GUIText. But currently you have to:

Get Vector3 XYZ
Make float variables for each X, Y, Z
Convert each float into a string (so another 3 strings)
Then Build String using those strings & put it in the Guitext

Would be nice if the Set Guitext (and other similar actions) had a 'Show Vector3 as string' field, or 'append Vector3 to this String', so I can output something like 'Current Vector is 2,2,2'

Or failing that, a 'Convert Vector3 to String' :)

Thanks

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4003
  • Official Playmaker Support
    • LinkedIn
Re: Convert Vector3 to String
« Reply #1 on: October 12, 2011, 07:24:28 PM »
A Convert Vector3 To String action should be very quick to make. I'll try to find some time to knock that out and post it...

In the long run though I'm hoping to add more automatic casting to Playmaker to avoid manual conversion. So, for example, SetGUIText could take any variable, converting to string as necessary...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Convert Vector3 to String
« Reply #2 on: December 15, 2011, 02:16:14 AM »
Hi,

 Here we go. I made a simple action to create a string from a vector3.

http://hutonggames.com/playmakerforum/index.php?topic=921.0

Bye,

 Jean