Create a Placement Indicator - Unity Lecture 17

Поділитися
Вставка

КОМЕНТАРІ • 5

  • @mahirrehman2013
    @mahirrehman2013 5 місяців тому +1

    hy i wnated to aks that if we have already used raycast in another scripts would this script work by

    • @TravelingTanveer
      @TravelingTanveer 5 місяців тому

      Yes, This should also work. In a project you can have multiple scripts using raycast.

  • @jawadshah8086
    @jawadshah8086 7 місяців тому +1

    Can u please explain this script in detail specially the UpdatePlacementPosition function.

    • @tofaani
      @tofaani  7 місяців тому

      Hi JawadShah,
      I hope you doing great. Let explain it a bit further for you. Both methods "UpdatePlacementPosition"" & UpdatePlacementIndicator" are interlinked. Main idea is UpdatePlacementPosition find exact position in the real world environment and update few required variables like placementPos, placementTransform etc, in our case its a wall that we are detecting. Then 2nd methods calls and utilize those variables and just place the indicator(2d image of cross pointer) at that location. When we move the device it keeps updating it.
      For more simple understanding you can imagine once we are scanning the room it creating a invisible mesh on the walls and then we are making a raycast, taking the position of that detect mesh point, placing 2d image of indicator at that point.
      I hope it helps you. Thanks

    • @jawadshah8086
      @jawadshah8086 7 місяців тому

      @@tofaani Thanks alot