You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: FAQ.md
+28-7Lines changed: 28 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -261,19 +261,19 @@ When a WebRTC connection is not being made for whatever reason one key point of
261
261
262
262
In some applications you may want your mouse to stay visible while interacting with the stream. As a large portion of applications in UE are first/third person, it will capture the windows mouse when you join the stream and make it invisible by default. Doing the following steps means you'll need to click and hold to turn the camera.
263
263
264
-
Firstly in your Epic project do the following:
264
+
Firstly in your UE project do the following:
265
265
266
266
1. Open Edit > Project Settings > User Interface
267
267
2. Head to the User Interface section
268
268
3. Under Software Cursors, click +
269
269
4. Select "Default" as the mouse option in the drop down and "HiddenCursor" under the second class dropdown.
270
270
271
-
This hides the default Epic cursor. This is important as you will likely end up with 2 cursors at the same time (which is very disorientating).
271
+
This hides the default UE cursor. This is important as you will likely end up with 2 cursors at the same time (which is very disorientating).
272
272
273
273
Secondly, you'll need to edit App.js. You can find it under Samples > PixelStreaming > WebServers > SignallingWebServer > Scripts.
274
274
275
-
Line 857 has a segment that specifies ControlSchemeType as seen here:
276
-
```
275
+
Around line 850 of App.js there is some a segment that specifies ControlSchemeType as seen here:
276
+
```js
277
277
constControlSchemeType= {
278
278
// A mouse can lock inside the WebRTC player so the user can simply move the
279
279
// mouse to control the orientation of the camera. The user presses the
@@ -285,11 +285,32 @@ const ControlSchemeType = {
285
285
HoveringMouse:0
286
286
```
287
287
288
-
Set `LockedMouse: 0` and `HoveringMouse: 0`, this will ensure that it does not lock your mouse to the stream.
288
+
Just below that is where there is an JS object where the control scheme is specified, like so:
289
+
290
+
```js
291
+
let inputOptions = {
292
+
// The control scheme controls the behaviour of the mouse when it interacts
293
+
// with the WebRTC player.
294
+
controlScheme:ControlSchemeType.LockedMouse,
295
+
296
+
// Browser keys are those which are typically used by the browser UI. We
297
+
// usually want to suppress these to allow, for example, UE4 to show shader
298
+
// complexity with the F5 key without the web page refreshing.
299
+
suppressBrowserKeys:true,
300
+
301
+
// UE4 has a faketouches option which fakes a single finger touch when the
302
+
// user drags with their mouse. We may perform the reverse; a single finger
303
+
// touch may be converted into a mouse drag UE4 side. This allows a
304
+
// non-touch application to be controlled partially via a touch device.
305
+
fakeMouseWithTouches:false
306
+
};
307
+
```
308
+
309
+
You can set `controlScheme:ControlSchemeType.HoveringMouse` to ensure that it does not lock your mouse to the stream.
289
310
290
-
Lastly, we need to ensure the mouse isn't hidden, head to line 1552:
311
+
Lastly, we need to ensure the mouse isn't hidden, head to around line 1550:
0 commit comments