Code:
{$CLEO .cs}
0000:
WHILE TRUE
WAIT 0
IF 0AD2: 0@ = player $PLAYER_CHAR targeted_actor
THEN
Actor.StorePos(0@, 1@, 2@, 3@)
0AB1: @AIM_AT_POS 4 XYZ: 1@ 2@ 3@ ADD_CAMERA_OFFSET 0.04253
END
END
//0AB1: @AIM_AT_POS 3 XYZ: 1@ 2@ 3@
:AIM_AT_POS
0087: 8@ = 3@
068D: get_camera_position_to 3@ 4@ 5@
0063: 0@ -= 3@
0063: 1@ -= 4@
0604: get_Z_angle_for_point 0@ 1@ store_to 6@
6@ -= 90.0
0017: 6@ /= 57.2957795
005B: 6@ += 8@ // (float)
0A8D: 7@ = read_memory 0xB6F248 size 4 virtual_protect 0
0A25: set_camera_on_players_X_angle 7@ Z_angle 6@
0661: "by Opcode.eXe | UGBASE.EU"
0AB2: 0
Hello. I've been trying to add a smoothing factor to this snippet for HOURS now but I can't get it to work. I tried dividing the angle difference by 2.0 but it aims completely off. I don't know what I am doing wrong. Can somebody please guide me on how to add a smoothing factor to this particular snippet or give me some helpful advice? Thank you