C2 has No Mouse tracking (mouse plugin)?!

Discussion and feedback on Construct 2

Post » Tue May 17, 2016 9:48 pm

The mouse plugin has no expression for tracking x and y axis! You know, you can of course save teh last position of the mouse and get the difference but that only works until you hit the edge of the screen :o.

What would you you need it for... well... my game for one thing as I am using it to spin the camera fps style :(
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,173

Post » Wed May 18, 2016 1:52 am

Try my rex_touchwrap plugin which is modified from official touch plugin and had some additional features.
Here is a sample capx of displaying current cursor's position.
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568

Post » Wed May 18, 2016 8:20 am

I have question, if that is ok.

I read 'fps style'. fp.. stands for first person ....

Meaning the camera should (since its 2D) be on the players position and look in the direction that the player is looking ?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed May 18, 2016 7:05 pm

99Instances2Go wrote:I have question, if that is ok.

I read 'fps style'. fp.. stands for first person ....

Meaning the camera should (since its 2D) be on the players position and look in the direction that the player is looking ?


Well, I mentioned fps as first person shooter because that is an example use that I think everybody would get right a way... and yes, I may have been using construct 2 in a pseudo 3d capacity ;) (think old 3d games)

But the last statement you made could be another use. I think alot of games prefer not to be spinning because it is nausea inducing in the top down look in the direction as the player... human eyes don't track rotation like that and so its not as useful... but could still have its uses.
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,173

Post » Wed May 18, 2016 10:34 pm

Okay, if its not 'that' what should the camera-movement that you have in mind look like ?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Thu May 19, 2016 4:09 am

99Instances2Go wrote:Okay, if its not 'that' what should the camera-movement that you have in mind look like ?

I believe OP was referring to the mouse always being centred on the screen, moving it would cause the screen to move; although I find it difficult to find an application for this in a 2D game.
B
7
S
1
G
2
Posts: 16
Reputation: 1,392

Post » Thu May 19, 2016 7:10 am

Ah !


ty
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Thu May 19, 2016 7:25 am

Hi Ruskul,

Have you looked into "Mouse Lock v0.5" plugin by @TiAm ?
It worked well for both @Prominent 's and my FPS experiments :)

If you're going to download this plugin, be sure to update runtime.js with the fix provided by @McKack below.
McKack wrote:@tecbug @TiAm
I had that same error message with NW.js. At line 440 in runtime.js I just commented out everything like this:
Code: Select all
/*document.pointerLockElement =   document.pointerLockElement       ||
                                  commenting out the above line makes this work as intended. Don't know why.
                                  document["mozPointerLockElement"]   ||
                                  document["webkitPointerLockElement"];*/

This also fixed the problem I had with "Mouse is currently locked" condition.

A couple of lines above in the runtime.js file it actually says "//the below isn't working. Commented out for now."
Was it supposed to be commented out and was just forgotten? :)

Haven't noticed any issues so far after doing that.
B
43
S
24
G
20
Posts: 156
Reputation: 13,604


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 4 guests