• Gamedev
  • how to change the center of rotation of the Template in the Game Room

Hi!

I am writing the code for the movement of my game character, a cat on an airplane, which, other than go up, down, left, right, must pull up the nose and dive the nose down, so I set a max rotation value of -10 degrees and I divided the Move Y action value by it (attached images). The problem is: it is possible in the Game Room to change the poit of application of the rotation? because now it is on the right of the sprite, while for my effect to have success, it should be at the center of the object.

Thanks for the replies

    You should set rotation axis in the texture, not in the template or a room.

      6 days later

      In fact, my real problem is how to set a fixed airplane rotation of 15 degrees counter clockwise ("nose up") around the rotation axis (set at the geometrical center of the airplane) when i press Move Y UP, and how to set a fixed 15 degrees clockwise rotation (nose down) around rotation axis when I press Move Y DOWN. My single line code "set rotation ((action value) : (MaxRotationValue)) is a pityful idea, I have a lot to learn. But I noticed that when I use this code with the Xbox360 analog stick the effect is not so totally bad. Surely there is a very much better way to do this.

      The rest of the code is totally ok because I have taken it from an Your tutorial on youtube, and you are a very clever coder, while I am still so bad as hell at coding... But I won't give up 😄 .

      I need the airplane nose fixed rotation, because my game main character is a black cat on a propeller airplane that needs to sink world's greatest warships and planes, and so in the future I am planning to code bullets that goes diagonally low if the player fires when moving downwards, diagonally high when he moving highwards, and horizontally when stationary or moving left or right.

      But before thinking at how to code bullets, I need the plane to look up and down when moving up and down.

      Any Idea to code in a better way than mine the airplane nose up and down? Thanks as always for Your precious help

        HI! SOLVED! In this way it works and with the analog stick is AWESOME:

        Where MaxRotationSpeed property is set to 0.4 .

        Goodbye

          Write a Reply...