Skip to content

Some missing camera functionalities #4074

Open
@blonter

Description

@blonter

Is your feature request related to a problem? Please describe.

Hi guys.

I noticed that some of the Camera's functionality are missing from MTA.

  • Camera Zoom Animation: When you aim with Rifle (ID: 33) you will see that the camera smoothly zooms in. Would be good to have a function which could speed up the zooming animation or make it slower. (get/set)

  • Camera Zoom Level: Would be cool to have a function which could set the zoom level, so for e,g I could zoom with Rifle twice as further away or the opposite, I could limit the distance.

With these we would have the possibility to create "jumping" zoom levels, like AWP in CS has two zoom levels, setting camera's zoom level without using animation or making it really fast so it'll look like an instant.

I am aware of the fact, that the custom zoom level can be achieved by scripting, however it won't be as nice and smooth as it is in the base game. And we shouldn't reinvent the wheel when it already exists :) Of course until this gets into the game we need to use our custom scripts.

  • Camera smooth transition between fixed and following mode:

    • From following to fixed: This can be achieved by scripting, you can take away the player's camera smoothly and change it to a fixed position. Where this is used in the base game? When the player goes into a garage, the camera remains targeted on the player but it will "fly" to a fixed position. You can observe this behaviour by going into a garage with a car in singleplayer.
    • From fixed to following: This cannot be done currently on MTA smoothly. You can save the player's viewmode and calculate where the camera should be before using setCameraTarget(localPlayer) but as soon as you set the camera target, the transition will look ugly, the camera's lookAt coordinates will reset. In singleplayer, leaving the garage will make the camera fly back smoothly and follows the player, keeping where the player's camera matrix/lookAt coords were before.

I think there should be a way of keeping the focus remaining on the player while we can still change the camera's position. I don't know how exactly the base game does this but it has this ability which currently lacks in MTA.

Just imagine how nice custom mission cutscenes could be made with this, or really awesome camera animations in minigames.

Describe the solution you'd like

Maybe some functions like these:

getCameraZoomLevel
setCameraZoomLevel
setCameraZoomAnimationSpeed
getCameraZoomAnimationSpeed
disableCameraZoomAnimation ?
enableCameraZoomAnimation ?

setTargetedCameraPosition ?

Describe alternatives you've considered

No response

Additional context

No response

Security Policy

  • I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions