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

[Bug/Feature] Tool no longer moves with the camera when in first person in certain cases. #593

Open
alekseiM88 opened this issue Jun 25, 2024 · 1 comment
Labels
bug Something isn't working dev/informed issue forwarded to dev team for consideration experimental issues discovered in experimental builds type/engine Issues related to the Game Engine

Comments

@alekseiM88
Copy link

alekseiM88 commented Jun 25, 2024

Describe the bug

On the stable branch (1.5.4) the functions AttachCameraTo and SetCameraOffsetTransform modify the placement of the player's held tool as well as the camera. This is not the case on the experimental branch (1.6.0). While I think this may have been on purpose, the changes do break something I was working on, so here I am.

Steps to reproduce the behavior

  1. Make a global mod and put this in its main file:
function tick(dt)   
    -- Tools will remain with the camera in 1.5.4 (what is wanted),   
    -- and they will remain with the player's body in 1.6.0 (what is not wanted).    
    --AttachCameraTo(GetWorldBody())   
    SetCameraOffsetTransform(Transform(Vec(0, 0, 4)), true)   
end  
  1. Enable the mod and load a map on the stable branch.
  2. Do the same on the experimental branch.

Expected behavior

I'd expect the tool to move with camera, but it doesn't on the experimental branch. Note that while SetCameraOffsetTransform doesn't change the tool's position, SetPlayerCameraOffsetTransform does. I'm guessing this is on purpose, however I wouldn't be able to use it for my project as I still use AttachCameraTo to stop the player's automatic height adjustment from messing with the camera. See below for what might be a better solution.

Environment

  • Teardown Version 1.6.0 (Experimental)
  • OS: Ubuntu (more or less) with Teardown running under proton.
  • GPU: RTX 3060
  • Graphics driver version: 535.otherdigits
  • CPU: Intel something or other, doesn't really matter for this bug.

Additional context

Possible alternative/better solution:

A SetPlayerHeight function in the API to forcefully set the player's height for that frame. It would allow me to work around the issue in my specific use case, while also still making sense and being useful to other people.

Here are also some videos I recorded to better demonstrate the behaviour I've been experiencing.

Stable Branch:
https://github.com/Teardown-Issue-Tracker-Maintainers/Teardown-Issue-Tracker/assets/136792894/52bf47dd-8b6e-423c-a7e6-cda1e521e6c2

Experimental Branch:
https://github.com/Teardown-Issue-Tracker-Maintainers/Teardown-Issue-Tracker/assets/136792894/c02a60cb-42c8-4e27-8a2b-067f2c907d2b

@alekseiM88 alekseiM88 added the bug Something isn't working label Jun 25, 2024
@alekseiM88 alekseiM88 changed the title [Bug/Feature] Tool no longer move with camera when in first person in certain cases. [Bug/Feature] Tool no longer moves with camera when in first person in certain cases. Jun 25, 2024
@alekseiM88 alekseiM88 changed the title [Bug/Feature] Tool no longer moves with camera when in first person in certain cases. [Bug/Feature] Tool no longer moves with the camera when in first person in certain cases. Jun 25, 2024
@YuLun-bili YuLun-bili added type/engine Issues related to the Game Engine experimental issues discovered in experimental builds labels Jun 25, 2024
@Gregory-Gregory Gregory-Gregory added the dev/informed issue forwarded to dev team for consideration label Jun 27, 2024
@Gregory-Gregory
Copy link

@alekseiM88 hi!

Thank you for reporting this. I have forwarded the information to the QA team and will let you know if they have any updates regarding this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dev/informed issue forwarded to dev team for consideration experimental issues discovered in experimental builds type/engine Issues related to the Game Engine
Projects
None yet
Development

No branches or pull requests

3 participants