Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

How Do You Get X,Y,Z Values From Raycast.HitPosition?

Discussion in 'Programming (In-game)' started by Ryan Kruge, Mar 23, 2019.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Ryan Kruge Trainee Engineer

    As of recently, I have begun programming a simple laser designator that works with a drone that my friend built a while ago. The script is all done and I have successfully achieved a functional raycast that records a set of coordinates from where the attatched camera hits with a raycast, however, I want to display the individual X Y Z values to an LCD screen so that the player can copy and paste it into their GPS list. If you could also help me to directly add coordinates to the players GPS list that would be amazing.



    It is a very simple script and works fine but I can't seem to find a way to Echo the X Y Z values of info.HitPosition.
    Thanks again. :D
  2. Ronin1973 Master Engineer

    I don't think you can convert a Vector3D position directly to a string. You'll have to break it up into three numerical coordinates and then convert those to a string. Here's an article on Reddit that might help.
Thread Status:
This last post in this thread was made more than 31 days old.