YesNoOk
avatar

CameraZoom (Triggers) 1.1b Exclusive (Read 1443 times)

Started by Just No Point, October 28, 2015, 03:27:35 pm
Share this topic:
CameraZoom (Triggers) 1.1b Exclusive
#1  October 28, 2015, 03:27:35 pm
  • ******
    • www.justnopoint.com/
Gets the value of the camera's zoom factor.

Format:
CameraZoom

Arguments:
none

Return type:
float

Error conditions:
none

Details:
The zoom factor de
Example:

Code:
fvar(1) = CameraZoom * ScreenWidth
  Sets fvar(1) to the distance between the left and right edges
  of the screen.  The expression "CameraZoom * ScreenWidth" is
  equivalent to the GameWidth trigger.
Re: CameraZoom (Triggers) 1.1b Exclusive
#2  August 08, 2016, 11:52:19 am
  • ******
This might help in case someone wants to use this:
http://mugenguild.com/forum/topics/a-little-understanding-mugen-1-1b-zoom-controller-175655.0.html

I learned something new about this controller.

If this is in a camera helper

;-------------------------------------------
[State 7660, Zoom]
type = zoom
trigger1 = 1
scale =fvar(22)
pos = ((pos x) / fvar(22)) * CameraZoom, (pos y) -  (CameraPos y / fvar(22))) * CameraZoom
;-------------------------------------------

this will focus on the camera helper whatever it is.

the fvar(22) is the a relative value for zoom! not absulute!

if zoom is 1 that no change
if zoom is below 1 you got wide screen zoom out.
if zoom is bigger than 1 you can zoom in.

CameraZoom will return only the value of current stage zoom. it won't be effected by your zoom controller.

for example
if the stage's default zoom is 0.75
you put fvar22 = 1. the out come will be still 0.75
if you put fvar22 = 1.25 the out come will be 1


if you simple put pos = 0,0
the camera will always zoom in for the center of the screen
if you simple put pos = pos x, pos y
the camera will out of focus if you give a big zoom value.

Mugen have a default stage camera that you can't see.
and it moves according to the stages settings you need to subtract it effect when you use your own camera.