Skip to content

Commit 65631c1

Browse files
committed
2 parents 1dd2f6b + 30513fc commit 65631c1

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

FAQ.md

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -261,19 +261,19 @@ When a WebRTC connection is not being made for whatever reason one key point of
261261

262262
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.
263263

264-
Firstly in your Epic project do the following:
264+
Firstly in your UE project do the following:
265265

266266
1. Open Edit > Project Settings > User Interface
267267
2. Head to the User Interface section
268268
3. Under Software Cursors, click +
269269
4. Select "Default" as the mouse option in the drop down and "HiddenCursor" under the second class dropdown.
270270

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).
272272

273273
Secondly, you'll need to edit App.js. You can find it under Samples > PixelStreaming > WebServers > SignallingWebServer > Scripts.
274274

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
277277
const ControlSchemeType = {
278278
// A mouse can lock inside the WebRTC player so the user can simply move the
279279
// mouse to control the orientation of the camera. The user presses the
@@ -285,11 +285,32 @@ const ControlSchemeType = {
285285
HoveringMouse: 0
286286
```
287287
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.
289310
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:
291312
292-
```
313+
```js
293314
function registerHoveringMouseEvents(playerElement) {
294315
//styleCursor = 'none'; // We will rely on UE4 client's software cursor.
295316
styleCursor = 'default'; // Showing cursor

0 commit comments

Comments
 (0)