02-13-2019, 02:36 PM
Hey there,
At first i wanna say that i already searched the documentations und forum for this problem, but did not find anything and wanna tell you a short summary of the project iam working on, so you could understand my problem better:
Iam working on an large project with ~120 km of railwaytracks. Everything is set up fine with curvy splines and controllers and so on. trains are traveling on the splines, but now i have the task to let the camera drive over the spline (thats fine too) and to be able to teleport to specific positions along the track.
Its easy to make an button and add the on click () "SplineController.SetFromString Position=50000" (Position is absolute), but now i have to implement an InputField where the customer can input an number he wishes and then only has to click the button and get teleportet to the desired position, but i dont know how to get the string from the InputField out and insert itĀ into the on click () "SplineController.SetFromString Position=DesiredPosition" or if there is an better solution to achieve the same thing?
Yet another problem is the other way around:
As my camera travels along the spline i can see the absolute position updating in the editor, but i need to have it shown in another TextField in my UI, but dont know how to get the updating position number.
Hopefully you can help me with these problems and best regards.
At first i wanna say that i already searched the documentations und forum for this problem, but did not find anything and wanna tell you a short summary of the project iam working on, so you could understand my problem better:
Iam working on an large project with ~120 km of railwaytracks. Everything is set up fine with curvy splines and controllers and so on. trains are traveling on the splines, but now i have the task to let the camera drive over the spline (thats fine too) and to be able to teleport to specific positions along the track.
Its easy to make an button and add the on click () "SplineController.SetFromString Position=50000" (Position is absolute), but now i have to implement an InputField where the customer can input an number he wishes and then only has to click the button and get teleportet to the desired position, but i dont know how to get the string from the InputField out and insert itĀ into the on click () "SplineController.SetFromString Position=DesiredPosition" or if there is an better solution to achieve the same thing?
Yet another problem is the other way around:
As my camera travels along the spline i can see the absolute position updating in the editor, but i need to have it shown in another TextField in my UI, but dont know how to get the updating position number.
Hopefully you can help me with these problems and best regards.