Unable to move mouse while right-clicking when CameraType is Scriptable

I believe so, the camera is completely locked no matter what you do. This completely breaks my game (and games that rely on custom camera scripts I would say)

While it may appear to have the same end symptom as the OPā€™s case, it does help us to know which games are affected, for our QA to regression test them. Sometimes a bug that seems the same as someone elseā€™s can have a different cause (e.g. two or more places in the code that have a similar bug, but in different branches hit by different games). Also, it helps us gauge severity of the issue to know which games are affected, so that we can take the time we need to find all the issues we have to fix, but not leave a flag on that is inconveniencing thousands of players.

2 Likes

Alright, this is my game where itā€™s happening: https://www.roblox.com/games/973170751/Trainware-Experimental-Lab#!/game-instances

and hereā€™s a simple empty place with just the camera code: https://www.roblox.com/games/1000937559

Ah OK, I see the issue, thanks!

I will take a look at the camera code, because this is also a game Iā€™ve really wanted to play every time you tweet about it, but Iā€™ve never been able to get into the train before. Just now, I was in the cab, looking out of the left window (and of course unable to move the camera). But, prior to this, Iā€™ve tried playing this game several times and have never even gotten in the train before. Normally, after the selection of train, station, platform, Iā€™m left 1000+ studs above the track looking at the red brick, able to pan the camera, but with no working UI and nothing to do except Esc-Leave.

1 Like

No problem!

And ah yes, thatā€™s one of the most reported bugs the game has received, which will be fixed in an update in the coming days. :smile:

1 Like

Iā€™m also experiencing problems with the ā€œWatchā€ mode for scenic flybys of my trains. Instead of staying where the user ā€˜placedā€™ the camera, after 2 seconds in, it locks itself facing forward and follows the train and cannot be moved again.

This never happened before it worked perfectly before the update.

I am pulling my head off because of this.

Please can someone confirm that itā€™s the Update and not my fault?

1 Like

Are you using Camera:Interpolate? It behaves strange after the update.

Iā€™d recommend switching to using TweenService or a custom interpolation function for now:

1 Like

Is there any ETA on the fix? Iā€™m kind of trying to push out an update to my game but Iā€™m being held back by this :confused:

The flag will be turned off today, and when itā€™s turned back on next week it should not recur.

2 Likes

Yes this is the code

					Cam.CFrame = workspace.Desk.CameraStart.CFrame
					Cam.CameraType = 6
					wait()
					Cam:Interpolate(workspace.Desk.CameraEnd.CFrame,workspace.Desk.CameraFocus.CFrame,10)
					wait(9.5)
					for i = 90 , 1 , -1 do
						local NextCFrame = NPCHRP.CFrame * CFAngle
						NPC:SetPrimaryPartCFrame(NextCFrame)
						wait(NPCWait)
					end

Can you provide a sample code or even better implement TweenService or CFrame:lerp() to my script. Thank you

Something like this should work:

Cam.CFrame = workspace.Desk.CameraStart.CFrame
Cam.CameraType = "Scriptable"

local tweenInfo = TweenInfo.new(10, Enum.EasingStyle.Linear)
 
local tween = game:GetService("TweenService"):Create(Cam, tweenInfo, {
	CFrame = workspace.Desk.CameraEnd.CFrame,
	Focus = workspace.Desk.CameraFocus.CFrame
})
 
tween:Play()

tween.Completed:wait()

for i = 90 , 1 , -1 do
	local NextCFrame = NPCHRP.CFrame * CFAngle
	NPC:SetPrimaryPartCFrame(NextCFrame)
	wait(NPCWait)
end

You can find more information about TweenService here.

2 Likes

Good to do this kind of update regardless, because Camera:Interpolate() is on our list of things to deprecate as of the next major update. Camera:Interpolate will still be available for a little while, but since itā€™s in the C++ camera class, itā€™s going to be one of those deprecated things that actually does go away, as opposed to just being hidden on the wiki and discouraged. All it does is simple linear interpolation of the camera and focus positions, along with keeping the camera pointed at the focus with each step, using the CFrame look-at behavior that has y-axis polar singularities.

2 Likes

This bug is CRITICAL and is affecting my game Velocity Flight Sim, rendering it completely unplayable within a few minutes - unhappy players are constantly reporting this issue (really bad experience for those just purchasing it as itā€™s paid access with many demanding refunds for an issue that we neither caused nor can fix).

4 Likes

This bug is also affecting my game and making it unplayable. I thought this would be fixed by now but please fix ASAP.

2 Likes

Still experiencing this issue, and itā€™s been a week since you posted this. (Sorry if that part sounded arrogant, was just pointing out the amount of time that has passed. I am also aware that it takes time to fix these things) Any update?

Thank you for your patience! It should be fixed for everyone with this coming Tuesdayā€™s update. We elected not to simply turn of the flag globally because the move to Lua-based camera and control scripts is a very important prerequisite for upcoming features and very few places were seriously affected, only a handful of games with the magic combination of setting the camera type to Scriptable, using mouse input to control the custom camera, and also having the default Roblox camera scripts enabled and running. There shouldnā€™t be anything wrong with this, it should have worked as it always did whether the Roblox cameras are being used or not, but there is a bug in the Lua implementation specific to Scriptable. Impact was low only because most games with Scriptable-based custom cameras are either disabling the Roblox camera scripts entirely with an empty, disabled, or replacement CameraScript local script in StarterPlayerScripts, or the Scriptable type is only being used when the camera is not being directly controlled by user mouse input (e.g. kill cams, cut scenes, static shop views / 3D UI views, etc.)

For the impacted places that were called out above or sent to me via DM, I had the flag turned off selectively. It does take approximately a week for a fix of this nature to be live; itā€™s important to do the QA due diligence for player scripts, because they are used by more than 99% of Roblox games, so a fix made in haste could easily turn a bug affecting 8 games into one affecting thousands of games and millions of players.

6 Likes

@Coeptus @AllYourBlox

Itā€™s still happening

I use the Exact same code provided and itā€™s still broken !!!

Video

Before it broke

I use Roblox Video Recorder to Record both Videos, and the script works smoothly in game itā€™s the Recorder causing the Video to Stutter.

@Coeptus you are awesome for providing me with the script.
Maybe this time we can try CFrame:Lerp() ?


I didnā€™t posted it after the reply from Coeptus because I thought it would work fine and then I just found out that it doesnā€™t. :sob:

I hope this will be fixed soon @AllYourBlox , I also DM you the details a week or two ago but you never replied.

Iā€™m just going to work on other stuff for now.

2 Likes

No problem :smiley:

Are you sure youā€™re using the updated camera scripts? If you have older versions saved in StarterPlayerScripts, the camera might not work properly.

1 Like

As noted above, the bug fix should be live with the next update (6/19). We selectively disabled the flag for public places developers reported as seriously affected. This is so the developers would not have to republish live games just to patch this. For any private places under development that are blocked by this, you can copy the camera scripts into your game and find the two references in RootCameraā€™s UpdateMouseBehavior() to LockCenter and LockCurrentPosition and exempt them from Scriptable. For example, changing

UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter

to

UserInputService.MouseBehavior = (game.Workspace.CurrentCamera.CameraType == Enum.CameraType.Scriptable) and Enum.MouseBehavior.Default or Enum.MouseBehavior.LockCenter

or the equivalent if-then structure. And the same for LockCurrentPosition.

1 Like