How do you make the vcam track the player

hi, i was making a platformer, but it seemed too small, so i had an idea that if i make the level huge, and the character small, it will make it seem like one continues game, but i need a vcam so it doesn’t reveal the whole thing. how do you make the vcam track the player?

2 Likes

hi @mojad
@Hamzah_Al_Ani sent me this example program which explained it to me.
I hope it helps you too.
using vcam.wick (11.7 KB)
run this file. use “+” to zoom out “-” to zoom in, left/right arrow to go left/right.
The code for this is in the vcam object on the stage. select the big blue box which is the vcam, look at the update function. The bit that moves the page is on the end from line 28. The smiley character(keyboardcontrol) is what you are actually moving with left/right keys and the vcam is following the character.
Thanks @Hamzah_Al_Ani

thank you! :)

sorry that this topic is old, but I modified the cam’s code to a smooth side-scrolling cam

My Project2-14-2021_14-55-44.wick (11.7 KB)