Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function "setVehicleComponentRotation” (misc_b-c) does not work with the fire truck (ladder) with ID 544 #3819

Open
1 task done
T-MaxWiese-T opened this issue Oct 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@T-MaxWiese-T
Copy link

T-MaxWiese-T commented Oct 21, 2024

Describe the bug

The function setVehicleComponentRotation for the vehicle components (misc_b and misc_c) does not work with the fire truck (ladder) with ID 544.
I think this model is a special case, because as far as I know it is the only vehicle where the vehicle components (misc_b and misc_c) move depending on changes in the vehicle chassis rotation (not wheel movements). The vehicle components misc_b and misc_c are attached to misc_a, but still seem to be able to be controlled independently of misc_a.
However, the mechanics are similar to door physics.
The specified values are not applied at all although the function setVehicleComponentRotation returns true and the vehicle components (misc_b and misc_c) are apparently only adjusted dynamically depending on changes in the vehicle chassis rotation.

Steps to reproduce

1. Execute this client code when you're sitting in a fire truck with a ladder:

function setVehicleComponent()
  local veh = getPedOccupiedVehicle(localPlayer)
  local x, y, z = getVehicleComponentRotation (veh, "misc_b")
  local successful = setVehicleComponentRotation(veh, "misc_b", 0, 0, 17.9)
  outputChatBox(tostring(successful))
  outputChatBox(x)
  outputChatBox(y)
  outputChatBox(z)
 end 
 addCommandHandler ( "set", setVehicleComponent)
  1. The rotation of the vehicle component (misc_b) do not change.

Version

Client: v1.6-release-22763
Server: v1.6-release-22763

Additional context

That the game is at least in missions able to change the rotation of the vehicle components misc_b and misc_c possibly even with adjustment of the model collision can be seen in this video: https://youtu.be/5PuIWNLOSAU?si=HFScTuGrh6Fid1Ac
I also experimented a bit if I can deactivate the vehicle components of the fire truck with ladder with C++ code but I didn't find any possibility, also in the gta-reversed repository I couldn't find any code in this regard.
I also tried the setVehicleAdjustableProperty function and it did not work. However, this function does not seem to be designed for the fire truck with ladder.
Another problem I see is that the function setVehicleComponentRotation only changes the position of the visible model but not the position of the model collision. The function setVehicleAdjustableProperty, on the other hand, also changes the position of the model collision.

Relevant log output

No response

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.
@T-MaxWiese-T T-MaxWiese-T added the bug Something isn't working label Oct 21, 2024
@Xenius97
Copy link
Contributor

Xenius97 commented Oct 23, 2024

Some components not working properly, this is similar to #2941

@T-MaxWiese-T
Copy link
Author

By the way, in the released SilentPatch the ladder of the fire truck can be raised with the Num2 key.
Here is the code:
https://github.com/CookiePLMonster/SilentPatch/blob/d74b104473c22540a450f14daaebe3bbbde4617d/SilentPatchSA/SilentPatchSA.cpp#L1590

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants