I’m trying to make a holographic sight in which the reticle stays in the center of the screen. Right now I’m using a billboard gui 80 studs in front of the camera which works fine, but the reticle doesn’t clip out when it is outside the frame of the scope. I was hoping to achieve that by having the reticle in a surface gui with clips descendants enabled on the lens of the scope and projecting the 3d position of the current billboard gui onto the surface gui but I don’t know how I could go about doing this.
If the reticle was in the scope it’d still be projected in front of the camera and would be visible when you stopped aiming in the center of the screen.
If the billboard gui was adorneed to the scope then it’d be affected by the sway of the gun which is what I’m trying to avoid.
Ok, I think an easier approach would to ask why don’t you just keep the scope steady in the screen? Assuming the scope is welded to something, you could update the weld each frame to keep the scope in the center of the screen.
Wait until the scoping in animation is finished, then do:
local DISTANCE = 4
local Stepped = game:GetService("RunService").RenderStepped:Connect(function()
local TargetCFrame = Camera.CFrame.lookVector * DISTANCE
local ScopeWeld = Scope.Weld
local ScopeWeld.C0 = ScopeWeld.C0:CFrameToObjectSpace(TargetCFrame)
end)
I only want to keep the reticle steady, not the entire scope. And yea, the scope is welded to a gun but
I made it transparent to show off my problem better.
When zoomed in you can have it be that 80 studs away. When you unzoom just re position the reticle so that it’s in the scope. So when the player stops holding the zoom button, wait x time and put the reticle in the gun as if it was actually there. The time to wait depends on how quickly you unzoom I guess.
Well, this is the second time someone has bumped this topic but I am kinda desperate to get this function in my framework, could you elaborate on what variables are what…?
This question really should be answered at some point, since this is a great feature and I love seeing it in games.
Create a part that is the size of the scopePart and use mouse.Target, If the target of the mouse is the scopePart then, Make the gui visible hence make it transparent, Oh and don’t untick the scopePart’s canQuery so that the mouse.Target detects it