- Home /
Using Raycast Normal to match surface rotation to instantiated gameobject? EXAMPLE GIF Included
Hi guys, I have been trying to build a simple base building / resource management style game that takes place on a spherical low poly world (which has proven a lot more difficult then I anticipated). My issue is that I cannot get the "building" gameobject (in this case the green cube) to match the rotation of the surface of the individual building tiles (each triangle face is a tile). This is absolutely essential, otherwise buildings will not line up to the planet's surface at all...I believe this is possible by using a raycast, but am at a loss as to how to go about it. Any help is appreciated.
It would help if you had included your current code. Was that gif made by you? Don't you already use a raycast?
Your answer
Follow this Question
Related Questions
hit.normal rotation problem, help please really confused 1 Answer
Raycast hits and then doesn't fire again? 2D Game Raycasting Problem 1 Answer
Help finding out which side of a cube a raycast hits 1 Answer
RayCast can't detect GameObject at Player's feet 0 Answers
Raycast not hitting instantiated object when timescale is 0 1 Answer