View Issue Details

IDProjectCategoryView StatusLast Update
0008654Multi Theft Auto : San AndreasScriptingpublic2017-06-28 22:48
ReporterNecktroxAssigned Toqaisjp 
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Version 
Target Version1.5.1Fixed in Version1.5.1 
Summary0008654: [Request] Function setCameraFOV
Description

I am not sure if this is possible, but if somebody could try to implement the function setCameraFOV (Field of View) as it's possible with setCameraMatrix.

I saw a CLEO script changing the FOV:
http://gtasa.gamebanana.com/tools/5408
and maybe it's possible.

TagsNo tags attached.

Users sponsoring this issue
Sponsors List Total Sponsorship = EUR 10

2015-06-05 12:33: Grafu (EUR 10)
Users sponsoring this issue (Total Sponsorship = EUR 10)

Relationships

related to 0008985 closed Add "aiming" to get/setCameraFieldOfView 

Activities

qaisjp

2015-04-21 21:09

administrator   ~~0023228

Seems like an easy feature (I'm sure Necktrox means the FOV for dynamic targets, not just for the static camera) but the new field of view setting in the Video Settings may conflict with the server settings - this will have to be discussed.

Grafu

2015-04-22 11:32

viewer   ~~0023233

I think the server value should override the one set in the settings. And there should be a function to reset the FOV.

qaisjp

2015-06-04 18:30

administrator   ~~0023348

Functions to be added:
setCameraFOV
getCameraFOV
resetCameraFOV (to default FOV)

Does anyone think we also need a "getDefaultCameraFOV", which returns the default setting the user has on their client?

ccw

2015-06-04 19:13

administrator   ~~0023349

Player camera FOV setting is available here: dxGetStatus().SettingFOV

Camera set functions only affect the non targeted camera, so:

function getCameraFOV()
local x,y,z,rx,ry,rz,roll,fov = getCameraMatrix()
return fov
end

function setCameraFOV(fov)
local x,y,z,rx,ry,rz,roll = getCameraMatrix()
setCameraMatrix( x,y,z,rx,ry,rz,roll,fov )
end

function resetCameraFOV()
setCameraFOV(70)
end

qaisjp

2015-06-04 20:03

administrator   ~~0023350

Last edited: 2015-06-04 20:08

View 2 revisions

Yes, but I think Necktrox is requesting the ability to change the user controlled camera FOV (and not the static cam)

don't need resetCameraFOV now because of dxGetStatus().SettingFOV

Necktrox

2015-06-05 17:27

developer   ~~0023351

@qaisjp: Exactly. I already made a GTA camera clone with custom FOV, but it didn't work exactly how I wanted

And FOV 110 should be the maximum. Anything above has glitches.

ccw

2015-06-05 17:41

administrator   ~~0023352

Why do you want to change the player FOV ?

Woovie

2015-06-05 17:41

manager   ~~0023353

MLG pro's need higher FOV.

Necktrox

2015-06-05 20:56

developer   ~~0023354

This should be closed. The clientside setting is enough (but it should be increased to 110 max.)

qaisjp

2015-06-05 23:48

administrator   ~~0023355

Last edited: 2015-06-06 14:43

View 2 revisions

Fair do, I'm not too sure if Woovie was being serious or not so I'll wait for his input before this is closed. I still feel server owners would like to control the FOV, though.

Grafu

2015-06-07 18:17

viewer   ~~0023357

Where I would use it at? Zooming the camera while on first person aiming. That should allow us to make custom zoomable rifles.

qaisjp

2015-06-10 02:35

administrator   ~~0023359

Last edited: 2015-06-10 03:12

View 4 revisions

added in https://github.com/multitheftauto/mtasa-blue/commit/8c62713de880a1676ecb347fb18e432c4145a8aa

https://buildinfo.mtasa.com/?Author=&Branch=&Revision=7285

https://wiki.multitheftauto.com/wiki/SetCameraFieldOfView
https://wiki.multitheftauto.com/wiki/GetCameraFieldOfView

ccw

2015-06-10 02:46

administrator   ~~0023360

The player FOV setting does not change the FOV while aiming

qaisjp

2015-06-10 03:03

administrator   ~~0023361

Last edited: 2015-06-10 03:10

View 3 revisions

okay, i guess this needs a bit more work then - I originally had two args to setfov: onfoot and inveh.

I noticed that when the camera moved from inveh to onfoot the camera snapped badly so I removed this feature and just made the fov set both.

If I can find memory addresses for the field of view whilst aiming (or if someone can provide it) then ill this at the second arg.

Necktrox

2015-06-10 13:40

developer   ~~0023363

The wiki example for setCameraFieldOfView uses a serverside event

qaisjp

2015-06-10 13:45

administrator   ~~0023364

Thanks, fixed

ccw

2015-07-02 14:44

administrator   ~~0023497

Given the current state of setCameraFieldOfView, I suggest revert until it is fully working.

qaisjp

2015-07-02 20:49

administrator   ~~0023511

Reverted in https://github.com/multitheftauto/mtasa-blue/commit/2f892d649af212e0a998a78695c96c09e0ee03a0

qaisjp

2015-08-07 02:34

administrator   ~~0023858

added in https://github.com/multitheftauto/mtasa-blue/commit/b6d2ce0b3a962c53cb6000f306d75e1438af004c

Issue History

Date Modified Username Field Change