Jii789's Forum Posts

  • 2 posts
  • Hello and thanks for the reply.

    Well yes I know that it is not really a random angle, but it feels like it is to a player. I don't understand the logic behind it perfectly but it will set the angle depending on where the cursor is at the X axis when the right button is clicked and that causes the “jump”, maybe the logic goes just like you said.

    After I posted that question I started playing with ui/hud and already realized that if I'm using layout angle for rotation, it will rotate the hud around as well. So I changed rotation to only take account layers 0 and 1, and now hud will stay where it should be.

    Player is supposed to strafe when right button is down and A or D is pressed, and rotate when right button is not down. So now strafing is quick and easy to use and you don't need to set different keys for it. This maybe explains the “glitchy” feeling.

    Currently I don't know how to implement those add and subtract commands with mouse correctly and that is why I was using layer/layout rotation. But if that what you suggested doing with the mouse lock is possible it might work, I'll try it out.

  • Try Construct 3

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

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

    I’m working on a prototype and trying to rotate the screen with the mouse, but now I’ve hit the brick wall.

    Player is supposed to be facing up all the time and screen (layout) is supposed to rotate clockwise when right mouse button is down and mouse is moved to the right, and counter clockwise when mouse is moved to the left. With keyboard (A or D pressed without right clicking) it’s working perfectly, but with mouse when you right click, the screen jumps to random angle. After this jump it’s working like it supposed to be. I have also tried to get rid of the jump by using this Mouse Lock plugin which gives you more mouse functions, and I was able to prevent it to jump when right clicking, but as soon as you moved the mouse, screen jump rotated again to random angle.

    Does anyone have any clue how to solve this and prevent screen/layout to jump rotate to random angle?

    My prototype file: Prototype2.capx

  • 2 posts