Log in to reply
 

I need help to create a Lightning with the "DRAW_LINE" native



  • I try to create a lightning effect with "DRAW_LINE" native. My problem is to get the right coordinate (Vector) for each line and idk how to solved this problem, i spent now 12h with that, but it wont work.

    native

    Ped LightningTarget;
    Vector3 boneCoordsR = PED::GET_PED_BONE_COORDS(PLAYER::PLAYER_PED_ID(), boneID_R, 0, 0, 0);
    Vector3 boneCoordsL = PED::GET_PED_BONE_COORDS(PLAYER::PLAYER_PED_ID(), boneID_L, 0, 0, 0);
    Vector3 pedCoords = ENTITY::GET_ENTITY_COORDS(LightningTarget, false);

    This will draw me a constant line from my ped to the targetped.
    DRAW_LINE(boneCoordsR.x, boneCoordsR.y, boneCoordsR.z, pedCoords.x, pedCoords.y, pedCoords.z, 110, 160, 220, 255);
    DRAW_LINE(boneCoordsL.x, boneCoordsL.y, boneCoordsL.z, pedCoords.x, pedCoords.y, pedCoords.z, 110, 160, 220, 255);

    I have made a picture as a example what I want to do...
    example
    I hope anyone can help me to explain me how to do or to figure out together how we can make something that looks simular like a lightning.


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.