How can I’ve a
Physics.Raycast auto-generate a path for itself to attempt to hit a given goal by means of a restricted window of house?
That is type of a protracted query, so I am going to attempt to clarify it one of the best I can:
- I’ve three GameObjects: a supply, a goal, and a “window”. This window sits between the supply and goal.
- I need the supply to make a raycast that factors within the path of the goal (not essentially it is
remodel.place, only a path that can make it hit the goal) and this raycast should cross by means of (collide and proceed by means of) the window GameObject
- I want to mechanically generate this path for the raycast to comply with such that #2 occurs
- I would love this algorithm to additionally acknowledge if the above isn’t attainable
- As an added merchandise, I would love this raycast to cross by means of (collide and proceed by means of) any objects that could be in it is means between it and the window
How can I accomplish this?
Thanks in your assist in superior!