I am currently making a weapon sytem and I want the player to look towards the mouse on the y axis.
I want them to still be able to move as normal so I think doing this using hrp joint’s C0 will work the best
Since Im not that good with theese types of stuff if possible can someone give me a forumla that will set the hrp motor6D’s C0 that will make the player look towards the mouse on the y axis
I made a module for this, it should be able to rotate the C0 to the desired look at position while constraining it so it only moves up and down along the y axis. Hope it helps.
Hello there, it’s me again with a small resource that I see lacking on the forum with
many, unsolved, or ones that have the general idea but incomplete scripting support questions.
@sleitnick, PID Controller from AeroGameFramework, works great but semi modified to accommodate Vector3 variables.
@ThanksRoBama, Great tutorial on PID Controllers which had excellent yet simple explanation along with great examples. Never knew it was possible to just work with P alone.
Thanks I will try that! But for now I cant currently so I will do it later. Thanks for helping me
Ok, i have problem that setting up theese attachments and stuff will be very hard from a script since im doing this on players so if there is a better solution it would be better but for now I will try doing something with this
I think I found a solution after a to of searching.
There is already a thread about this so here it is:
local Camera = workspace.CurrentCamera
local Player = game:GetService("Players").LocalPlayer
local Mouse = Player:GetMouse()
local RunService = game:GetService("RunService")
local player = game.Players.LocalPlayer
local character = player.Character
local primary = character.PrimaryPart
local bodyGyro = Instance.new("BodyGyro")
bodyGyro.Parent = primary
bodyGyro.D = 40
bodyGyro.P = 10000
bodyGyro.MaxTorque = Vector3.new(4000000, 4000000, 4000000)
local function rayPlane(planepoint, …