7/28/2023 0 Comments Mmd loading raycast with materials![]() Local raycast_result = workspace:Raycast(mouse_ray.Origin, mouse_ray.Direction * 1000, raycast_parameters)įunction get_rounded_position(position : Vector3) Local raycast_parameters = RaycastParams.new() Local mouse_ray = CAMERA:ViewportPointToRay(mouse_position.X, mouse_position.Y) Local mouse_position = S_USER_INPUT:GetMouseLocation() Local S_PLAYERS = game:GetService("Players") Local S_USER_INPUT = game:GetService("UserInputService") I have a suspicion that I know why it doesn’t work.Īlso, if you click on one (or more) of the sides (pretty sure its left and back) it instead adds on top of the part (and it doesn’t match with the grid.) It also sometimes has a very specific decimal on the Y axis. Whenever I click on a side of a block (or part), it goes on the side but the Y axis is either 1-2 studs higher. I tried to make a grid-based placement system. I haven’t really scripted in a while, so this might be a dumb question. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |