Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float radiansZ = rot->z * 0.0174532924f;
- float radiansX = rot->x * 0.0174532924f;
- float num = ABSF((float)cos((double)radiansX));
- Vector3 dir;
- dir.x = (float)((double)((float)(-(float)sin((double)radiansZ))) * (double)num);
- dir.y = (float)((double)((float)cos((double)radiansZ)) * (double)num);
- dir.z = (float)sin((double)radiansX);
- return dir;
- if (TEST2)
- {
- Vector3 rot = Func::get_gameplay_cam_rot(2);
- Vector3 Velocity = Func::RotationToDirection(&rot);
- int analogX = Buttons::AnalogMonitoring(Buttons::LeftX);
- int analogY = Buttons::AnalogMonitoring(Buttons::LeftY);
- if (analogY == 0 || analogY == 254)
- {
- if (analogY == 0)
- {
- Func::SET_ENTITY_VELOCITY(player_ped_id, 10 * Velocity.x, 10 * Velocity.y, 10 * Velocity.z);
- }
- }
- /*if (analogX == 0 || analogX == 254)
- {
- if (analogX == 0) Velocity.x -= 10.0f;
- if (analogX == 254) Velocity.x += 10.0f;
- }
- if (Buttons::isDown(Buttons::Button_A))
- {
- Velocity.x *= 2.5f;
- Velocity.y *= 2.5f;
- }*/
- Func::SET_ENTITY_VELOCITY(player_ped_id, Velocity.x, Velocity.y, Velocity.z);
- Func::SET_ENTITY_ROTATION(player_ped_id, &Func::get_gameplay_cam_rot(2), 2, 1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement