How can I make the movement of the player and camera smoother? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 12

How can I make the movement of the player and camera smoother?

The player moves according to the next tile's offset top and offset left, and the camera always has the offset top and left of the player. When pressing any button to move the player, you can see that the player and camera instantly move to the next tile. My question is: How can I make something like a transition for both player and camera when moving to other tile? I tried adding transition for player but then the camera doesn't follow the player properly. I tried adding smooth transition to the camera, like i saw on some stackoverflow question, but it didn't work. Help. https://code.sololearn.com/W633K7RqhVca/?ref=app

27th Sep 2020, 7:42 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
9 Answers
+ 6
you have did tile bases movement i think... search about linear interpolation... and add that script in your camera's movememt ... wait let me give some link https://en.m.wikipedia.org/wiki/Linear_interpolation https://youtu.be/8uLVnM36XUc
27th Sep 2020, 8:00 AM
Prashanth Kumar
Prashanth Kumar - avatar
0
Can i make game without game engine
28th Sep 2020, 10:21 AM
TRxRyzen
0
TRxRyzen nope it's going to be extremely difficult u can use engines like unity they support easily and for free
28th Sep 2020, 3:56 PM
Ved Thaker
Ved Thaker - avatar
0
I think u can using CSS
28th Sep 2020, 8:15 PM
Amine Hazmiri
Amine Hazmiri - avatar
- 1
O
27th Sep 2020, 4:49 PM
William Aime
William Aime - avatar
- 1
It's long coded required and needs css animations
28th Sep 2020, 7:28 AM
Ved Thaker
Ved Thaker - avatar
- 1
Can we make game without game engine
28th Sep 2020, 10:19 AM
TRxRyzen
- 1
Seems static sha...try adding little animations I'm getting there soon
28th Sep 2020, 1:44 PM
Jet Zani
Jet Zani - avatar
- 1
i think C# is better
29th Sep 2020, 6:45 AM
akarsh
akarsh - avatar