• Create Account

# implementing camera like the one in Rayman Origins

5 replies to this topic

### #1sobeit  Members   -  Reputation: 281

Like
0Likes
Like

Posted 12 October 2013 - 01:17 AM

Hi all,

I'm trying to implement a camera following the character like they did in Rayman Origins.

I want the camera to always lead a little bit in the direction the character is facing, and follow the character as smooth as possible.

does anyone have some ideas or resource I can look into? Thanks.

### #2Yrjö P.  Crossbones+   -  Reputation: 1402

Like
1Likes
Like

Posted 13 October 2013 - 04:47 AM

The simplest thing you can do to make the camera lead the character is to maintain a camera offset that ticks towards 0 over time (so the camera will center on the character when not moving), is increased quickly whenever the character is running to the right, and is capped to some maximum offset value.

The general method to smooth any camera is to attach it to the point of focus with a damped spring. In this case, the point of focus is the offset position.

### #3sobeit  Members   -  Reputation: 281

Like
0Likes
Like

Posted 13 October 2013 - 08:47 PM

right now, I problem is that I need to find a equation to calculate the velocity. it should be like image below, but instead of time being horizontal axis, it should be velocity and the vertical axis should be time or distance. any input is appreciated.

### #4Yrjö P.  Crossbones+   -  Reputation: 1402

Like
0Likes
Like

Posted 13 October 2013 - 09:00 PM

I problem is that I need to find a equation to calculate the velocity.

The velocity of what?

### #5sobeit  Members   -  Reputation: 281

Like
0Likes
Like

Posted 13 October 2013 - 09:06 PM

velocity of camera, with a initial speed. I want the velocity to decrease like the figure above, imagining the horizontal line is velocity, and vertical line is time or the distance between the camera and the player.

### #6Krohm  Crossbones+   -  Reputation: 2409

Like
0Likes
Like

Posted 14 October 2013 - 12:41 AM