C2 has No Mouse tracking (mouse plugin)?!

0 favourites
  • 8 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • 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 .

    What would you you need it for... well... my game for one thing as I am using it to spin the camera fps style

  • 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.

  • 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 ?

  • 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.

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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • Ah !

    ty

  • 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.

    tecbug TiAm

    I had that same error message with NW.js. At line 440 in runtime.js I just commented out everything like this:

    /*document.pointerLockElement =	document.pointerLockElement    	||
    											 commenting out the above line makes this work as intended. Don't know why.
    											 document["mozPointerLockElement"]	||
    											 document["webkitPointerLockElement"];*/[/code:2p08h9k5]
    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.
    
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)