- What do you want to achieve?
I am trying to make a game, where players using different parts, build structures or vehicles in order to win.
The thing I am trying to do RN is the building tool. I imagined it as an individual tool for each part (Players find parts around the map and have to pick them up). The picked up part works as a tool.
- What is the issue?
While I made a simple script for picking up and placing the newly acquired part, I ran into an issue. The parts work rather like “blocks”. If you try to place 1 part on another tilted or rotated part, the new part will not snap its orientation to the part you are about to place it on.
- What solutions have you tried so far?
I tried to make newly placed part match the Orientation property of the part that you are placing new part on. However it does not work really well with parts that are not cubical. I thought if raycasting would help, but I am not so experienced with it. This is why I finally decided to ask for help. This is my first ever post, so any help is appreciated.
Now I will give more details… So the tool itself is a simple tool with handle and a part that is gonna be placed attached to it. In the tool there is also a “holo” of a part (its half transperent clone of the part that is anchored, cant be collided with and leaves no shadows). When left mouse click is initiated, the part in tool is being moved to workspace and it’s holo position, and the tool is being destroyed. I use Mouse().Hit.Position to get the position of mouse.
If you need more details, ill try to make screenshots of code and such, but right now im just in confusion