Center view on closest axis after button released

Thank for your answer,
I do not understand everything, on the contrary, I am a [redacted] noob ;). I understand the general idea, but …

Hello has all,
Here is I would want to be able to move my camera with the right button pressed in fps view !
For now I use “setInputModeGameAndUi”, but I think later with the inventory, this will cause problems …
Only I manage my movements with the directions (0,90,180,360 ) and I would like to release the right button by managing the camera towards the closest axis (center with the axis Y)… For those who know, like Legend of Grimrock :wink:
Thanks… or not :wink:

You can use modulo!

Try this:

int degreesOffset = actualDegrees%90;
    If(degreesOfset > 45)
        ActualDegrees += degreesOffset;
    Else
        ActualDegrees -= degreesOffset;

Thanks, but it’s to easy for my :wink: I don’t have another explications for make that…

WHY is it too easy for your what? I find it very hard to understand your English so I might have misunderstood something.

Sorry for my very bad English … googletrad :frowning:
Humour is too hard for me … I’m a noob;)
I do a little trick that works is ready but I can not seem to have the last rotation ??? I am now looking to do a range of rotation vector … But I do not see how at this time

Change this answer to a comment please. Just make it a comment of my answer or something. Click the down arrow and select convert to comment.

Anyways, the reason you dont get the last rotation is because you will never get to the last branch. Change the > node to a < node and you are fine. They should ALL be < nodes.

Precisely at the beginning I had put that < but it was not working … I thought wrong.
I just figured with the print string, after + 180°, EU4 exchange has negative values (-180 to 0) …
Even reversing the values of > it does not matter … I am disappointed and I have no ideas yet :frowning:
Thanks
Ps:Not arrow for change your answer to comm… is not a comm now ?

Yessss, it’s working fine… he had to start from the smallest to largest (-180 to +180) I have problem with lerp…
Please another question, how to disable drag view with the left click ?
Thanks

If it is working fine the please accept my answer and post a new question as the second question is not related. It is cleaner that way. I will answer in your new question.

Under your answer post it says “more”. That arrow should have it.

For me it will be solved when the Lerp work… The lerp is an integral part of the movement …
Ok, left click it will be another question…
Thanks

After one day (it’s shame;)), it’s work fully…
picture for the following

Не buffoon, you’re not helping, so putting something out of reach for a noob, they say to you, you do not try to explain anything, and after you ask to ensure that valid the issue by promising to answer to another, just to raise your Karma … and after you’re disgusted and you vote - in my own answer … you did not do anything to me help … You’re a big badger !!!

Hello bobchocolat,

I’m glad to hear that your issue has been resolved. In the future, please try to be more accepting of help and try asking others to explain in clearer terms if there are problems understanding, instead of insulting them. Also please try to avoid using vulgar language.