How to get smooth-curve camera movement?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
cruddish
Posts: 3
Joined: Mon Dec 02, 2024 3:20 pm

How to get smooth-curve camera movement?

Post by cruddish »

Hi there! I'm currently using the Zoom2D sequence command. I know you can set it to transition smoothly over a number of seconds, but find the effect still to jarring for what I'm going for, is there a way to get the movement's smoothness to be "curved" (i.e. start zooming in slowly, then speed up, then slow down again before the end of the zoom) to make it seem more natural?
User avatar
Tony Li
Posts: 22203
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to get smooth-curve camera movement?

Post by Tony Li »

Hi,

Zoom2D() does linear movement. Two suggestions:

1. Write a custom sequencer command (e.g., duplicate SequencerCommandZoom2D.cs) that eases the movement in and out. You could use a tweening library such as DOTween to handle the movement in the sequencer command.

2. Or use Cinemachine, and switch to the Cinemachine***() sequencer commands.
cruddish
Posts: 3
Joined: Mon Dec 02, 2024 3:20 pm

Re: How to get smooth-curve camera movement?

Post by cruddish »

Tony Li wrote: Mon Dec 02, 2024 3:53 pm Hi,

Zoom2D() does linear movement. Two suggestions:

1. Write a custom sequencer command (e.g., duplicate SequencerCommandZoom2D.cs) that eases the movement in and out. You could use a tweening library such as DOTween to handle the movement in the sequencer command.

2. Or use Cinemachine, and switch to the Cinemachine***() sequencer commands.
Thank you, I switched over to using Cinemachine :)
User avatar
Tony Li
Posts: 22203
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to get smooth-curve camera movement?

Post by Tony Li »

Glad to help! I think you'll like working with Cinemachine.
Post Reply