on movement direction/target/position in normal state of animation (minus and plus) conditional animations occured after this.
m_Position
m_CurrentTarget
updates the camera's position (m_Position) based on the target position, direction, and current distance.
m_fCurrentAngleX and m_fCurrentAngleZ
updates the camera's target position (m_CurrentTarget) and angles (m_fCurrentAngleX and m_fCurrentAngleZ) based on tracking speed and desired angles
some basics of cameraroot methods to control and change ingame camera adjustment and definations to override camera's view :
m_Position
updates the camera's position
m_CurrentTarget
updates the camera's target position
Booleans to call function if neccessary and Check for Collider condition,"bCollisionWall".
Depending on whether a collision with a wall was detected
this adjusts the camera's distance (m_fCurrentDist).
its following defination under of m_fCurrentDist and if a collision occurred, it adjusts the distance at a faster rate (CAMERA_WALL_TRACKSPEED) compared previous updated to when no collision occurred (CAMERA_TRACKSPEED).
CheckCollisionWall
function to perform additional collision checks and adjust the camera distance further if necessary.
RSetCamera (Realspace to set device for camera)
m_bShocked (in condition checked camera(interrupted/and etc to cause screen shocked)
CameraPos(Default adjustment)
"ZCAMERA_FREELOOK"
this enabled will add "observation-mode" , free rotation mode to camera to player .
(pos)
Collision Checking performs collision checks in four directions: up, down, left, and right relative to the camera's position (pos) and direction (dir). For each direction
(dir).
the collision point plus the direction vector and from these 3 and other factors are calculated the fRealDist camera position and distance ingame.
(-dir).
(the camera values are added or decreased by various conditions to calculate real adjust of camera, so be aware of this as you change one function conditons, you may break the method for all the other conditions by skipping or changing one of them to not return neccessary update state.)
fRealDist
mix of cam distance between target and adjusted position by default its minus 10 units to overcome any overlaps that can be caused by camera position glitched so this is the physical camera vol presence.
Advanced state of camera adjusts:
initializes variables and calculates values related to the camera's field of view and aspect ratio.
fNearZ
It calculates a target position (tar) based on the camera's near plane distance (fNearZ)
tar
pos & dir
calculates a target position (tar) based on the camera's near plane distance (fNearZ) and the direction vector.
fD
Pick
The environment using the Pick function.
If a collision is detected, it further calculates the intersection point (bpi.PickPos) and compares it with the target position to determine if the collision is closer.
If the collision is closer, it calculates the distance (fD) between the target position and the intersection point.
fPH or fPV
If the distance is within certain thresholds (fPH or fPV), it determines if the collision is significant based on the angle between vectors.
end of methods
Return: It returns a boolean value indicating whether any collision with a wall was detected ("bCollisionWall") remember
bCollisionWall = true;
m_bCollision[1] = true;
but it has to update the boolean to false once you are further away from walls so to update current player position you return to check everytime you meet req to collide with objects.
->>
return bCollisionWall;