Leoncgp's Forum Posts

  • I think I may be having similar issues with the mouse camera. It starts off okay but in less than a minute or so into the game as you navigate with your mouse, it will suddenly snap to a particular random angle when the mouse is scrolled past a certain angle.

    Funny thing is for me, this problem never arise while playing in C3 mode, it only happens after exporting to nw.js format. I tried using different modes while exporting, eg. kiosk mode, resizeable windows, window frame, etc but to no avail, as problem still persists. Again, the problem happens only after it is exported. No such issue when playing in C3 browser mode.

    Judging from the number of people having similar issues with this, I think C3 people should seriously find a solution to this problem.

    I have attached the camera event action as follows.

    I have the same issue, both in the Construct preview and in the NW.js export.

  • const MOUSESENSITIVITY = 0.0015;
    
    function onMouseMove(e) {
     // Process mouse movement
     
     // Set camera's spherical coordinates according to mouse movement
     camLookTheta += e.movementX * MOUSESENSITIVITY;
     camLookPhi = Math.max(
     Math.min(
     camLookPhi - e.movementY * MOUSESENSITIVITY, Math.PI - 0.1
     ), 0.1
     );
    }
    
    
    function setCamera3D() {
     // Set camera position and rotation to follow the player
     
     const camX = player.x; // Camera X
     const camY = player.y; // Camera Y
     
     // Use terrain function to get correct camera height at any given point
     const zxratio = terrain.width/MESHRESX;
     const zyratio = terrain.width/MESHRESY;
     const camZ = 24 + player.zElevation + terrainElevation(
     player.x/zxratio - MESHRESX/2, player.y/zyratio - MESHRESY/2
     )
     
     // Spherical coordinates converted to cartesian coordinates
     camLookX = Math.cos(camLookTheta) * Math.sin(camLookPhi);
     camLookY = Math.sin(camLookTheta) * Math.sin(camLookPhi);
     camLookZ = -Math.cos(camLookPhi);
     
     // Apply camera settings
     camera.lookAtPosition(
     camX, camY, camZ,
     camX + camLookX,camY + camLookY, camZ + camLookZ,
     0, 0, 1
     );
    }
    
  • Well I’m not familiar with those examples and i don’t have access to a mouse so I can’t test for myself.

    Does the issue you’re encountering happen in those examples or just in your game?

    If it’s just happening in yours then somehow you’re not doing it the same. You’ll need to double check to look for any differences.

    If it happens in the examples too then I guess it’s flawed somehow? No idea where. You only posted a partial of how the camera is rotated from moving the mouse.

    This occurs in all examples of 3D third-person in Construct, whether through events or via JavaScript.

  • I have used the Collect the pages example as a foundation for a serial killer forest game project and I haven't had any problems with the camera, but I am not using any javascript and only the base construct 3 integrated actions. I do like to apply an extremely fast lerp for camera smoothing sometimes though, so possibly you can try using that technique to counter any jittering. It even works well in unity/VR projects for eliminating the overly precise oculus inputs.

    I didn't change anything, I simply use the default example code from Construct. In fact, the same issue occurs even when it's done via events, not just through JS. I tested it with all the 3D third-person examples, and the issue persists in all of them.

  • Hi, guys. Hope you're all doing well :)

    I'm developing a first person 3D game in JS, and while testing it, some friends referred to some issues with the mouse cursor. They said it was "flickering" and losing direction, like they couldn't control it. Do you have any idea what may be causing it?

    Here's the code I'm using (it's the same code Construct uses in Exfiltration Template, Collect The Pages, etc)

    function onMouseMove(e) {
     // Process mouse movement
     
     // Set camera's spherical coordinates according to mouse movement
     camLookTheta += e.movementX * MOUSESENSITIVITY;
     camLookPhi = Math.max(
     Math.min(
     camLookPhi - e.movementY * MOUSESENSITIVITY, Math.PI - 0.1
     ), 0.1
     );
    }

    Watch the video of the issue:

    Tagged:

  • Heey

    I have a 16x16 tileset. Their edges are adding up and I wanted them to share the same edge

    So it becomes thinner

    I'm not sure if I was able to explain it well, but here are some images of my issue:

    I would like it to be like this:

    Thanks!

    Tagged:

  • You do not have permission to view this post

  • Brand new technologies, mysterious and powerful gadgets and a brave (yet unexperienced) hero: this is the story of Hazy! The game's Steam page is now on, so make sure to put it in your wishlist to be notified of its release.

    https://store.steampowered.com/app/1413900/Hazy/

  • Hey all!

    is there any way to customize the native List component?

    Thanks!

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Someone?

  • do you say on different tabs or on the same project page? I'm not getting

  • Hello, all!

    I have 2 projects open, how to import objects from one project to another?

    Thanks!

  • I got it! I was forgetting to save the value of the variable.

    Thanks!!

  • Sorry, I expressed myself badly.

    Yes is an APK.

  • Leoncgp

    Hi. That condition On Video Complete is for Reward Video Ads only. You can try using On banner shown, but that would be awkward, cause you would have given an award to a player from just popping up a banner ad.

    Maybe try only giving rewards from Reward Video Ads instead. It's more suited for rewarding purposes.

    It is for Reward Video Ads