Apologies if I look stupid for asking this but would it be difficult to add a dual rendering scope system?
itās a really bad idea
porting code over to the framework would be easy (probably ) but i havent done it myself
When I animate the viewmodel I couldnāt move the actual gun, instead it moved the arms. I could move everything just fine except the gun.
https://gyazo.com/5d96269edba684d6c32b738adfd33ee1
āMainā is basically the receiver in the gun. I set all of the part 1ās and part 0ās in the motor6dās as if the script was doing it.
I canāt help with badly setup rigs since thereās a thousand things that can go wrong with them
check if anything is anchored or if part1/part0 are flipped
Hello, @BlackShibe, I want to say that I used your Open Source place, but I cannot seem to open the animations using Moon Animator, what do I do?
Could you perhaps explain the camera animation part more?
I tried putting your code (
local animatorCFrameDifference = self.lastReceiverRelativity or CFrame.new() * self.viewmodel.camera.CFrame:ToObjectSpace(self.viewmodel.rootPart.CFrame):Inverse()
local x,y,z = animatorCFrameDifference:ToOrientation()
workspace.Camera.CFrame = workspace.Camera.CFrame * CFrame.Angles(x,y,z)
self.lastReceiverRelativity = self.viewmodel.camera.CFrame:ToObjectSpace(self.viewmodel.rootPart.CFrame)
) into the update function, but for some reason, something interesting to say the least happens:robloxapp-20210501-1813552.wmv (1.5 MB)
I have little understanding of it considering its old and to be honest poorly named/written
if you want to fix it, please rewrite it yourself - the basic idea is:
- Get the rotation of the camera part
- Rotate the camera based on it
- Save it for the next frame
- When the next frame hits, move the camera back to where it was originally so camera movement doesnt stack
Or
- Measure the difference between the camera part rotation now and 1 frame ago
- Apply it to the camera
Edit: removed the code snippet from the tutorial for now
Very good tutorial but I have a question:
How would I make this work with a gun selection system? For example, you choose an AK47 and a M9 and then when you spawn in it will give you an AK47 and M9.
Thanks in advance
Read part 2, it includes server code that controls weapon selection
Hi, nice tutorial, I really liked it and would love to see new tutorials like this. But Iām having a problem with the camera CFrame, hereās how it looks like:
I tried using the command bar as @BIackShibe said, thanks to him, I added this to the command bar:
workspace.Camera.viewmodel.offsets.idle.Value = CFrame.new(0.7,-1.2,-1.1) * CFrame.Angles(0.005,math.pi / 2 + 0.005,0)
But the position of the gun is still the same, can anyone help me, please? I would really appreciate it!
did you click enter on the command bar?
Yes, and nothing changes, it only changes the value of the idle CFrame value and doesnāt change the Camera CFrame, and when I set the camera CFrame to the idle.Value it just rotates my camera about 90 degrees.
can you provide a video example
sure, but the video might be a bit too long, so I donāt know if it will send it here or not.
Hereās the link for it, I think you might have to download the video tho, ShowCase.mp4 - Google Drive
just say the video. try doing something like this
this is the update function which i then put into render stepped like this
āModuleScript
function Secondary:Update(dt)
if self.viewModel then
local finalOffset = self.viewModel.offset.idle.Value
self.viewModel.Root.CFrame = workspace.CurrentCamera.CFrame:ToWorldSpace(finalOffset)
end
end
ālocalScript
function update(dt)
newHandler:Update(dt)
end
did that solve the issue? (need to get this to 30)
Where do I place them please? Iām sorry, Iām trying to understand it and finish it.
Sorry late reply but did you read the entire tutorial? the poster explanes how to do this
Yes, I did, Iāll try to look more into it, thank you!