I want to create a camera animation using an ArcRotateCamera camera that maintains a vertical perspective but changes the camera's position

I want to create a camera animation using an ArcRotateCamera camera that maintains a vertical perspective but changes the camera’s position.

You mean like a top-down view? I think you can attach your ArcRotateCamera to a parent TransformNode and then move that around

2 Likes

Indeed, can do. Sound like a good solution to me. On the other hand, the orbital (arc rotate) camera only makes sense if you are to rotate and focus around a target. Else, another type of camera might be more appropriate?

2 Likes

If you use the ArcRotateCamera you have basically two ways of changing it’s view:

The first one is changing the: alpha, beta, radius properties.

The second approach is changing the: position, target properties. Every time you change any of these two properties call the camera.rebuildAnglesAndRadius() function.

2 Likes

First of all, I would like to express my gratitude. Everyone’s method is very good, and I understand where my problem lies now

1 Like

Thanks a lot for your kind words :pray: This (helping) is basically what we are here for :innocent: :grin:
In this sense, for …

If once you got it right, we could ask you to kindly post here the result and process of your ‘design-thinking’ to make it right, I’m sure it could become helpful for others facing the same kind of issue :smiley: No obligation though. Do it if you feel like it and meanwhile… have an awesome day :sunglasses:

3 Likes

Hi, (sidenote: nothing to do with this topic, sry :face_with_hand_over_mouth:) but since you’re here, I was just wondering “Did you get my PM”? I replied to this old conversation of ours but with the ‘thingy’ that happened in between, not sure you received it?

1 Like

Yes, I’ve just hit the Reply button :slight_smile: I read your PM this morning and had to give time myself to consume the coolness and to be able to reply! :wink:

2 Likes

I’m sorry, I just opened the forum and saw your friendly message
My initial solution was to create an animated collection of alpha, beta, and position for the camera. However, for some unknown reason, this method always succeeds in the first two tests, and there is a probability of success afterwards. If it fails, the angle control fails
When I woke up in the morning later, I remembered that GPT told me that ArcRotateCamera relies heavily on camera targets. I thought of no longer considering based on position, but based on the target, calculating the alpha/beta/radius values of the camera for the target before the animation and the alpha/beta/radius values of the camera for the camera’s focus on the target after the animation, and creating an animation of the camera focusing on the target
I opened the forum and saw that the reply largely matched my thoughts, so I gave it a try
Now it’s successful.

1 Like

I think different types of cameras have their own characteristics, so animations for different types of cameras should also be based on their characteristics

Does this mean you solved your problem?
Honestly, I can’t be quite sure of what you are trying to achieve.
Based on my gamer’s experience, I would assume you want a camera that follows the player/hero from a standard top-down/isometric view, yet giving the possibility to both zoom-in/-out and rotate around this target… is this assumption of mine correct? In this case, you would not need to calculate positions from the target, but rather - as suggested above - parent the camera to a node (transform or abstractMesh) of your character hierarchy. You can introduce some offset from the target to make sure the camera doesn’t just move each time you move your hero just the tiny-mini (which can be a bit annoying for the player).
Well, you know what, if you are still stuck or in doubt… would it be too much to ask you to quickly set-up just a rough PG (even non-working)? It’s very hard to give accurate feedback without a PG. Thanks and meanwhile, have a great day :sunglasses:

Yes.
I want to create an animation for the start of a game: 1. Display a global map first. 2. The animation should be smooth and focus the camera on the game character

Well, I believe this is something pretty common. For one thing that’s sure is that we should be able to have a correct set-up for this. There are a number of things though that are “per design”, such as camera collision and the offset/sentivity. As said, likely the best would be for us to put our hands on a PG, along with some explanation for the expected cam behavior… This of course, if you still need our help?

So are you just looking for the transition? You already have your camera set-up for step2) following the character. You’re just unhappy with the way it translates from the global/map view to the character view? It can be a little bit tricky. It also depends on whether the initial camera position and character position is fixed or not. In case it isn’t, it might require a couple of variables and a bit of maths. The animation itself might also require (benefit from) bezier and ease. Really, the PG here would become a must have…