It’s a lot more complicated to fix(Other bugs as well when looking straight at the middle), the shake is also caused by animations.
But I believe It’s fixed below:
So I am trying to do that and I think I got it, but there is one problem, having the thing aim correctly when the player changes orientation (it works well until the player starts walking):
I am using mouse.Hit.Position. The code I’m using is basically the one in the rbx file you attached here.
Is there any tutorial I can watch on how to use this. I am trying to create a turret using this module but I am having a hard time understanding what to do. This seems perfect for what I need it for
Hello again! I’m wanting to implement a lot of turrets handled individually by different players, and was wondering the best way to do this. I’ve came up with these options, and was looking for some guidance as to which I should go with:
Server does calculations and tells client the data needed to rotate the turrets. (How would I get just the calculations on the server?)
Server handles everything from calculations to rotating in a RunService loop.
As far as I can tell its correct, I even tried to Frankenstein it by putting the dummies head into the rig and reconnecting the rigs and motors still didnt work particularly well. Are the parts too big or something? or is there an issue with meshparts being used?
attachment on the right is the BaseAttachment for the GunBase (connected to the GunBase Part)
attachment on the left is the TurretAttachment fro the GunBase (connected to the part below (the turretBase)
the motor line (using rig edit lite) is directly above each other
attachment on the right is the TurretAttachment for the Gun (connected to the Gun part)
attachment on the left is the BaseAttachment for the Gun (connected to the Gunbase)
the motor is on the BaseAttachment (the orange circle)
im using PIDLookAt(mouse.Hit.Position, dt) in the HeartBeat function on the server
i switched to the normal LookAt function and it fixed it but i was using PIDLookAt so i could control the speed of the movement so im still wondering how to control that without using PID
edit: after reading through the setup again and messing around with settings i figured it out
How can i reset players rotation with this, im making a gun system like this game Isle, 9 - Roblox
but i cant reset players rotation after he uneqiups the gun.
Can someone help me?
im trying to make the barrel of my tank not move to the mouse instantly and it works for 3 of the tanks but this one for some reason doesnt work
i printed what the angularDistance is and it saids zero even though when i printed the currentRotation.LookVector and goalRotationCFrame.LookVector they were different and no way VectorUtil would return 0 for the distance
the code has been unchanged from the original module, again this works with all my other tanks except this one. exact same attachment orientations. exact same barrel orientation and front face
any way to fix this?
edit: found the solution, there is a bug where if the par tthat is moving has a different orientation that isnt 0,0,0 it wont rotate right
Hey, so im a little confused, first of all i’ve got no idea what PID is, but from what i can tell its something with more options than the default module, but is there no way to change how quickly it turns without PID? And is there no way to only have it enabled for certain controllers?