RiotGames / developer-relations

Riot Games Developer Ecosystem Bug Reporting
http://developer.riotgames.com
725 stars 44 forks source link

[BUG] Replay API not updating the camera for certain values. #877

Open duiker101 opened 5 months ago

duiker101 commented 5 months ago

Bug Description
When using the Replay API to control the camera in a replay, most values are not reflected in the game.

Problem Description
Making a POST request to https://127.0.0.1:2999/replay/render does not update all the values. The only one that seems to be working correctly is fieldOfView.

The updated values appear in the response of the API, but don't actually update the client, and doing a GET returns the original values.

Expected Result
Using the API can control the camera position, rotation etc...

Actual Result
The API responds correctly but doesn't update the game.

In this video you can see that making a POST to update the fieldOfView updates the game, but updating the cameraPosition coordinates doesn't.

https://github.com/RiotGames/developer-relations/assets/755683/11acbf20-9e70-44e1-b125-6415e18a700e

Developer Impact
I need this to take images of the Rift to update my tool.

Player Impact
My tool is used by teams that are requesting an updated map.

Repro Steps

  1. Enable Replay API
  2. Make this request
    
    POST https://127.0.0.1:2999/replay/render
    Content-Type: application/json

{ "cameraPosition": { "x": 9000, "y": 0, "z": 0 } }

ckroeper commented 5 months ago

Hello duiker,

I've run into similar issues and have come up with a few workarounds.

  1. Try setting the "cameraMode" from "top" (default) to "path" in your calls that modify the camera's position. This seems to usher the camera into actually moving to your desired location.
  2. Setting a y-value of 0 seems to be an invalid input, try leaving it at its default value. Is there a reason you are doing this?
  3. I've noticed issues with rendering after setting the FOV to the same value multiple times. The default on my machine seems to be 40, even though the spec says otherwise. Try this again without the call that sets the value to 40.
  4. Additionally, if you get any rendering issues, setting the camera mode to "top", then back to "path" seems to fix the camera.
duiker101 commented 4 months ago

Thank you @ckroeper! Setting cameraMode to path helped!

Would still be nice to have this properly fixed or documented.