Hi, so i have been trying for days now and i am about to lose my head over it…
What i am trying to archive is:
I want to rotate a object and rotate it along when moving my mouse, just like the unreal engine gizmo rotation does
The rotation from the mouse axis can be different because if you move the camera the raw mouse axis doesn’t always have the value to rotate and i can’t seem to know how to calculcte that
If it still doesn’t make sense, take a look at the unreal engine gizmo rotation, you can get a clear idea of what i am looking for.
The problem with you code, is that it doesn’t take in count of the position of the camera view from the target object you want to rotate
If it doesn’t get in counted, that means that going “Right” with the mouse would only lead to one direction rotation and not the desiered rotation acroding to the mouse rotation and camera angle from the target object
The unreal engine and unity gizmo for that matter, take in count of where you are looking according to the target object and bases the mouse axis for the rotation correctly (witch is waht i want)
That has one direction because you move with the camera
If you place a object in a unreal scene and have gizmo to rotation and try to rotate it and then change camera angle and position and try to rotate it exatly the same mouse movement you did
The result should not be the same even tho you rotate the mouse the same way, and thats is the right way
I just can’t seem to know how on earth one would archive that. There is little to zero knowgelde on the internet about it
Yeah, I know my implementation is pretty basic, but it works for my case. I’m using an object to rotate around it even for pan mode. Later I will rework this
I dont think its the same think i am looking for. You are panning around and according to you BP.
Your x axis value always will give you the direction you are trying to move
For and as i explained, that is what i am not trying to do, but rather have an mouse axis be a posetive/negative in the same direction, the value is based on the direction/angle from camera to object (like scene gizmo rotation does)
I know-how was that I spent almost two weeks to find a simple solution that is good enough for the current development stage
My game dev experience says me that it needs a lot more to make it great.