How would I ignore Camera Orientation with Mouse.hit

I’m looking for a way to ignore/remove Camera Orientation for my placement system!

Source:

local RunService = game:GetService("RunService")

local Mouse = game:GetService("Players").LocalPlayer:GetMouse()

local Dummy = script.Dummy
local HumanoidRootPart = Dummy.HumanoidRootPart

Dummy.Parent = workspace
Mouse.TargetFilter = Dummy

RunService.RenderStepped:Connect(function()
	HumanoidRootPart.CFrame = Mouse.Hit + Vector3.new(nil, (Dummy:GetExtentsSize().y / 2), nil)
end)

How does the camera orientation impact your placement system exactly?

Mouse.Hit uses the orientation from the camera,

You can get rid of it by creating a new CFrame with only the position component of the mouse in where it hit:

CFrame.new(Mouse.Hit.Position)
3 Likes

Sorry for the late response! It seems to work well, I’m mark it as a solution!
Thank you for your contribution! <3