Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Whay is Raycast()?

    General Discussion
    6
    14
    847
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • pianofire
      pianofire Fuze Team last edited by

      It appears to be undocumented

      1 Reply Last reply Reply Quote 0
      • Ben 2.0
        Ben 2.0 last edited by

        Oh...
        Then why does it turn blue when I type it in the code editor like other functions?

        pianofire 1 Reply Last reply Reply Quote 0
        • pianofire
          pianofire Fuze Team @Ben 2.0 last edited by

          @ben-2-0 I mean it is in the language but it is an experimental feature that may or may not be eventually made official. I will see if I can find out what the parameters are if you want to try it

          1 Reply Last reply Reply Quote 1
          • Ben 2.0
            Ben 2.0 last edited by

            Parameters are currently a position and direction in the form of a vector. The only output is a very large number that starts with 34. Thanks for looking into it @pianofire.

            1 Reply Last reply Reply Quote 1
            • Jonboy
              Jonboy Fuze Team last edited by

              I can't remember right now if this was officially implemented. It was intended to return a distance value from a 3D intersect. For example, if you wanted to measure the distance from four wheels of a vehicle on a sloped surface you would then be able to rotate the vehicle to match the slope. So the position is the point you want to check from. The vector is a 'ray' cast out in the direction given. The return 'should' be the distance from the point the Ray intersects with another 3D object.

              Again however, I can't recall if it was fully implemented so it could do with some testing to be certain.

              vinicity 1 Reply Last reply Reply Quote 4
              • Ben 2.0
                Ben 2.0 last edited by

                I was using it in a 2d area so that would be why I got a strange output.

                1 Reply Last reply Reply Quote 0
                • vinicity
                  vinicity F @Jonboy last edited by

                  @jonboy Would that be collision with the actual object or with the object's collision box?

                  1 Reply Last reply Reply Quote 0
                  • waldron
                    waldron F last edited by pianofire

                    watched this a while back, would be great to have this fully implemented

                    1 Reply Last reply Reply Quote 2
                    • Jonboy
                      Jonboy Fuze Team last edited by

                      @vinicity Collision box only - at least I think so! (so sorry..)

                      1 Reply Last reply Reply Quote 0
                      • waldron
                        waldron F last edited by


                        Just a single ray so far untill I get the distance height scales worked out.
                        Been trying this for a while, I'v managed to get it fully working using scratch casting 60 rays using distance to control brightness and scaling.

                        1 Reply Last reply Reply Quote 2
                        • Ben 2.0
                          Ben 2.0 last edited by

                          Very cool, if anyone wants to see what I made, let me know.

                          vinicity 1 Reply Last reply Reply Quote 0
                          • vinicity
                            vinicity F @Ben 2.0 last edited by

                            @ben-2-0 said in Whay is Raycast()?:

                            Very cool, if anyone wants to see what I made, let me know.

                            Show us!

                            1 Reply Last reply Reply Quote 1
                            • Dave
                              Dave Fuze Team last edited by

                              Just because it's relevant here: https://fuzearena.com/forum/topic/1909/undocumented-function-raycastobject-is-functional-and-can-be-used

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post