Controlling an Object While Pointer Lock is Active

0 favourites
  • 2 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.


    You're controlling a Character (presently the white box) as you fly down a corridor of space as Asteroids come at you from a distance. (Think: Star Fox on the SNES.) The 3D Camera is positioned behind the Character in line with the Character and the Reticule_3 object (the Reticule farthest from the Camera). As you move the Mouse around, the Reticule_3 object will move, too, up to a max amount and the Camera will lag behind in response. The Camera is also set to look at the Reticule_3 at all times.

    All of this works just fine presently.


    What I'm trying to do now is to add a Pointer Lock so that the Mouse pointer is invisible so that the "physical" limitations of the pointer on the screen is no longer an issue when controlling the Reticule_3 object.

    However, when I try to call Pointer Lock into action, this not only removes the Mouse pointer visibly, but also "physically". Meaning, the game can't track the Mouse's X/Y coordinates, which the controls currently depend on.

    What I am trying to do is figure out how to track the Mouse pointer's movements properly so that it still plays just like it does now.

    And any additional info about how C3 processes this info behind the scenes would be very helpful, too.

    Thank you!

    EDIT Problem Resolved

    I was able to figure out the solution to my satisfaction after all. I'm leaving this post up so that others can come by it and hopefully find help for similar problems.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thankyou for putting your solution up here Rhindon, this helped solve a problem for me!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)