Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Advanced search

1402902 Posts in 68139 Topics- by 61773 Members - Latest Member: LawrenceDev

October 06, 2022, 05:54:31 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Animated transition from top down to isometric with orthographic camera
Pages: [1]
Author Topic: Animated transition from top down to isometric with orthographic camera  (Read 1398 times)
Level 0

View Profile
« on: December 24, 2021, 08:20:13 AM »

  • Picture an island. It can vary in size/position.
  • My orthographic camera looks at it top down. It automatically repositions / resizes itself to have the entire island in view. Think of it like an overhead strategic view.
  • At certain points, I want to do an animated transition to an isometric view of that same island, with the island remaining centered on screen. Think of it like an action view, where the player can run around.
For now I've fudged it by putting an animator/animation on the camera position/rotation with root motion enabled but it doesn't seem to work quite right. I've tried Googling but am not finding much help. Maybe just not trying the right keywords. Any ideas how I should best approach this? Was kind of hoping I could DOTween it but unsure the math to figure out the position/rotation values that keep the center on screen.

Like this illustration - if this grad was my island, I want to animate the camera from the top down view to the isometric view https://cdn.tutsplus.com/cdn-cgi/image/width=400/gamedev/uploads/2013/05/the_isometric_grid.jpg
Level 10

View Profile WWW
« Reply #1 on: December 29, 2021, 07:31:13 AM »

It's been long enough since I used Unity that I'm not sure that the engine provides this functionality, but might the following work?

Instead of animating the camera freely, perhaps attach it to another, invisible scene-node. This other scene-node might then be placed at the centre of the view, and the camera offset along its forward axis by some appropriate, negative distance (i.e. backwards)--thus moving it out to a position from which it should be able to view the central point, and the island along with it. Then, when a change of view is desired, the other scene-node might be rotated in place, and if called for the camera moved along its "forward" axis. This should result in the camera swinging around to the desired position, if I'm not much mistaken.

A Fantasy Top-Down "Space" Metroidvania
Itch page ~ Twitter
Level 1

View Profile WWW
« Reply #2 on: April 27, 2022, 06:16:34 PM »

Pretty sure you could accomplish this with Cinemachine. Let me know if you need help sorting it out.

My site: Spotted Zebra
Pages: [1]
Jump to:  

Theme orange-lt created by panic