Difference between revisions of "ShaderFollowCharacter (CMS)"

From The Official Visionaire Studio: Adventure Game Engine Wiki
m
 
(One intermediate revision by one other user not shown)
Line 38: Line 38:
 
|-
 
|-
 
| delay || integer (number) || The amount of time (in milliseconds) needed to scroll &/or zoom the camera to the current characters location.
 
| delay || integer (number) || The amount of time (in milliseconds) needed to scroll &/or zoom the camera to the current characters location.
|}
+
|}{{toc}}
{{toc}}
 

Latest revision as of 14:49, 19 May 2015

Name Type
shaderFollowCharacter(character, zoom, delay) Execution


Smoothly follow the specified character around the screen. The shader toolkit is needed for this function to work.


Examples

Enable

Follow current character around the screen

shaderFollowCharacter("", 1.2, 3000) -- follow current character at 1.2x zoom over 3s per movement.

Follow a specific character around the screen

shaderFollowCharacter("character_name", 1.2, 3000) -- follow character_name at 1.2x zoom over 3s per movement.

Disable

Stop following character & restore screen viewport back to default value

shaderStopFollow(easeQuintOut) -- stop following camera & ease back to viewport default with QuintOut


Syntax Breakdown

Name Type Description
character "string" This should be the name of the character you want to follow; if string is empty then it will automatically follow the current character.
zoom float (decimal) This should contain the zoom amount. (1 = default)
delay integer (number) The amount of time (in milliseconds) needed to scroll &/or zoom the camera to the current characters location.