# Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

### Newcomers AppGameKit Corner / Smooth Orbit + Chase Camera?

Message
Posted: 17th Aug 2018 15:31
Hi! So I've been looking on the forums for a Smooth Orbit + Chase Camera & can't find one. Can someone please help a chap out?

Thanks!
Posted: 17th Aug 2018 23:27
I would just use easing.
So you have your current point (x1,y1) and you have where you want to go (x2, y2)

nx = x1 + ((x2 - x1) * ease)
ny = y1 + ((y2 - y1) * ease)

where ease is a value between 0 and 1. So .01 would move very slowly and .9 would move very quickly

Some 2d camera tracking methods
Posted: 17th Aug 2018 23:37
Hi, @blink0k : I was actually looking for a 3D camera.

Thanks!
Posted: 17th Aug 2018 23:55

nx = x1 + ((x2 - x1) * ease)
ny = y1 + ((y2 - y1) * ease)
nz = z1 + ((z2 - z1) * ease)

for the rest it depends oon what you try to achieve. if you want to orbit the cam by mouse, or if it should follow the player, or both, if it should avoid obstacles etc. but i doubt you will get presented a full solution. try to figure out what you want to achieve, and what components you need for the solution. then try to solve the components one by one.
Posted: 18th Aug 2018 01:14
Yea, I was looking for smooth orbit cam.

Thanks!
Posted: 18th Aug 2018 01:47
Just to clear up confusion, ease is essentially linear interpolation, which is also this:

I think they are functionally equivalent.
Posted: 18th Aug 2018 02:10
Where do I define the variable, "ease" ?
Posted: 18th Aug 2018 09:26
you may write it where ease stands, as you may want different values for different directions. go ahead and try.
Posted: 18th Aug 2018 21:59
I meant like what do I substitute "ease" for?

Thanks!
Posted: 19th Aug 2018 01:12 Edited at: 19th Aug 2018 01:12
ease as float
ease = 0.5 // Or any value between 0.01 and 0.99

make sure your x/y/z and/or angle values are floats as well
try it