Execs DriverCollisionDebug & PlayerCollisionDebug do not work

Issue #168 resolved
Matt Hands created an issue

Incredibly useful execs in debug mode, especially DriverCollisionDebug, which draws the player's torso & head hit points in a vehicle position and also the vehicle's ammo & engine hit points.

Problem is it doesn't draw anything !

Out of 4 native DrawDebug Actor functions, only DrawStayingDebugLine seems to work. DrawDebugLine, DrawDebugCircle & DrawDebugSphere appear to do nothing.

Comments (4)

  1. Matt Hands reporter

    I noticed a comment in DH_ATGunTwoCannonPawn that gave the solution. For AT cannon pawn's DebugExit() exec function, a comment said you had to type "show sky" in the console to toggle the sky off, or the debug cylinders would not be drawn/visible.

    Tried it with DriverCollisionDebug() and it works ! Also with PlayerCollisionDebug() and anything else that used the DrawDebug native functions.

    Can be done manually in console, but I have added automatically to relevant DH execs by adding the line: ConsoleCommand("show sky");

    Don't think there is any bool to say whether sky is already toggled off, so if more than one of these execs is run it will toggle the sky back on and nothing will draw. But can still be done manually in console. Have added explanatory comments for all functions.

    In single player, try DriverCollisionDebug() with behind view and with "show collision" in console, to also see vehicle occupant's collision boxes. Really, really useful - but also shows how off a lot of the vehicle occupant hit detection is.

  2. Matt Hands reporter

    Improved substantially in commit bad7d05. I am ridiculously pleased with this !

    DriverCollisionDebug exec now only shows vehicle occupant hit points (torso& head).

    New VehicleHitPointDebug exec shows vehicle hit points (engine & ammo stores) and now also DH special hit locations (optics, gun traverse & pitch). Now using different colours for different types of hit points.

    No longer uses console command "show sky", as did not work in multiplayer. Now uses new SetSkyOff() function in DHPlayer to hide or show the sky. All happens on local client only; no replication. Now runs some logic to determine whether to toggle off the sky when the debug options is switched off, based on whether other other similar debug options are enabled.

    AT gun cannon pawn gave the clue that sky had to be hidden, but turns out it doesn't even need it for AT guns's DebugExit() function ! That's because it uses a custom DrawDebugCyclinder() function that uses DrawStayingDebugLines() to construct the cylinder, unlike the same named function in ROHud that uses DrawDebugLines. So removed sky stuff from gun'd DebugExit(). And made it so exit debug can be toggled on/off.

    ps - Might be worth using the AT gun's DebugExit system to show vehicle exits?

  3. Log in to comment