3 ways for the camera to follow the player | GMS2.3 Tutorial
Вставка
- Опубліковано 27 лип 2024
- 0:00 Intro
1:09 Option 1: Room Editor
4:26 Option 2: Code
10:39 Shorter Camera
13:32 Option 3: Smooth Camera
17:37 Outro
Links
Starter Project: github.com/ArendPeter/CastleG...
Final Project: github.com/ArendPeter/CastleG...
Art Credit:
github.com/ArendPeter/CastleG...
Gist shorter camera: gist.github.com/ArendPeter/69...
realtutsgml tutorial: • Game Maker Juicy Effec...
Playlist
• Basic Castle Platformer
Office Hours Submission Form ( for helping debug your projects on livestreams :) )
forms.gle/Mp2258ZBNhFShr548
Tutorial Submission Form
forms.gle/9N6UpX2YiLmeb1Sw8 - Навчання та стиль
Very cool, thank you for sharing!
FOR ANYONE HAVING ISSUES WITH SMOOTH CAMERA
use the camera code in a script, as seen in the video then copy and paste this code into your character. (if using dnd you can place an "execute code" block, put it in your steps, and paste it there.) you can change the .025 numbers to adjust how tightly the camera follows the player.
var target_x = x - cam_w()/2
var target_y = y - 150
var camX = lerp(cam_x(), target_x, .025)
var camY = lerp(cam_y(), target_y, .025)
camera_set_view_pos(
view_camera[0],
camX,
camY
)
THANKSSSSSSSSS!!!!!!!!
edit : nvm syntax error
the camera code isn't working : (
any idea why ?
6:44
Nice tutorial, thank you :)
After a few failed attempts to add the smooth camera effect though, I've just copied and pasted your ShorterCamera script and your "view follow player" code, its all works except that smooth camera isn't doing anything, there's absolutely no ease-in no matter what the settings are.
Is there something in the inspector settings in viewports and cameras or anywhere else that could be causing this?
Thanks
Strange, there are any inspector settings that I can think of
Mind sharing your camera code in oPlayer step? I can take a look
How can I do a slow zoom in?
Howcome you have code and i have buttons that i have to drag and i cant script -_-
Hi thanks for watching the video
When you make a new project in game maker you'll have the option to select between drag and drop or gml. For this tutorial you'll need to select gml, sorry for not clarifying
Can you make a smooth camera in drag and drop only?
If u follow the code tutorial you can right click the event then click convert to drag and drop to see the code in drag and drop style
Can you make a mobile scaling video
That's a good idea! Let me know if you have other ideas for mobile specific tutorials, this could be a good mini series