Gorkem95 Posted September 23, 2021 Share Posted September 23, 2021 Hello, Im trying to change camera pos/looking vectors but its not working well after attached to an entity Before camera attached an ped or entity(when fixed mode) CamSAInterface +0x160 - Fixed Pos +0x16C - Fixed Look Pos If i change these adresses in fixed mod its works but after camera mode change(attached) not working, im try to +0xC - Mode +0x19C - Pos +0x1B4 - Look Pos change camera mode to fixed again and update cam pos every frame but its only works once I tried to call CamSA-RestoreWithJumpCut to update camera pos but its not looks good(cam jumps behind of last attached ped for sec) How can i fix this or in scm these opcodes are works well 015F 0160 how can i call scm in c++? Link to comment Share on other sites More sharing options...
Jack Posted September 24, 2021 Share Posted September 24, 2021 15 hours ago, Gorkem95 said: How can i fix this or in scm these opcodes are works well 015F 0160 how can i call scm in c++? #include "plugin.h" #include "CCamera.h" bool camraPosSet = false; using namespace plugin; class PluginSdkProject4 { public: PluginSdkProject4() { Events::gameProcessEvent += [] { CPed *playa = FindPlayerPed(); if (playa) { CVector playaPos = playa->GetPosition(); CVector camraPos; CVector camraRotation; camraPos.x = playaPos.x + 0.0f; camraPos.y = playaPos.y - 20.0f; camraPos.z = playaPos.z + 30.0f; camraRotation.x = 0.0f; camraRotation.y = 0.0f; camraRotation.z = 0.0f; TheCamera.SetCamPositionForFixedMode(&camraPos, &camraRotation); // 0x15F TheCamera.TakeControlNoEntity(&playaPos, SWITCHTYPE_JUMPCUT, 1); // 0x160 } }; } } pluginSdkProject4; Basicly the code does this: 00A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] [email protected] += 0.0 [email protected] += -20.0 [email protected] += 30.0 015F: set_camera_position [email protected] [email protected] [email protected] rotation 0.0 0.0 0.0 00A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] 0160: set_camera_point_at [email protected] [email protected] [email protected] switchstyle 2 Gorkem95 1 Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
Gorkem95 Posted September 24, 2021 Author Share Posted September 24, 2021 (edited) Quote TakeControlNoEntity(CVector&, eSwitchType); Ty for this Edited September 24, 2021 by Gorkem95 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now