swiveldemon 0 Posted December 1, 2016 When driving a car, I'm interested in being able to access things like roll, pitch, and yaw of the car (how much it is tilted and how much it has turned). Is this something that is possible? Any help or links to helpful resources would be much appreciated! Thanks! sd Share this post Link to post Share on other sites
Jitnaught 370 Posted December 2, 2016 .NET: if (Game.Player.Character.IsInVehicle()){ Vector3 rotation = Game.Player.Character.CurrentVehicle.Rotation;} C++: if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID() false)){ Vector3 rotation = ENTITY::GET_ENTITY_ROTATION(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false));} Share this post Link to post Share on other sites
swiveldemon 0 Posted December 2, 2016 sweet thank you! Also, do you know if there is a way to get the rotation rates? Having trouble finding it in the docs Share this post Link to post Share on other sites
Jitnaught 370 Posted December 2, 2016 You mean like the change in rotation? Share this post Link to post Share on other sites
swiveldemon 0 Posted December 2, 2016 correct. That and vehicle speed, current turning radius, etc. Is there a doc you are looking at for this? Share this post Link to post Share on other sites
Jitnaught 370 Posted December 2, 2016 (edited) I don't think there is a native function for change in rotation. You'd have to subtract the current rotation by the last rotation. //not sure what language you're using so here's an example for C#. don't actually use the wait(1000) in a modVector3 oldRotation = Game.Player.Character.CurrentVehicle.Rotation;Wait(1000);Vector3 newRotation = Game.Player.Character.CurrentVehicle.Rotation;Vector3 changeInRotation = newRotation - rotation; Vehicle speed is: float speed = Game.Player.Character.CurrentVehicle.Speed //c#float speed = ENTIY::GET_ENTITY_SPEED(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false)); //c++ Turning radius is (.NET only): Game.Player.Character.CurrentVehicle.SteeringAngle Only documentation I look at is the Native DB. I also look at the source code of Script Hook V .NET. Edited December 2, 2016 by Jitnaught Share this post Link to post Share on other sites