|
| 06 Jan 2014 04:00 PM |
I have this code:
cam:Interpolate(CFrame.new(character.Head.Position),CFrame.new(character.Head.Position),5)
To make the camera move back to the head from a camera effect in the course of 5 seconds. But it just teleports the camera to the head, it doesn't move it smoothly like the Interpolate method is supposed to.
Any ideas why? |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
| |
|
|
| 06 Jan 2014 04:06 PM |
Hmm weird. Maybe I didn't copy it correctly from my game, as I posted this before, then copied it to the forum, from their copied it from the forum and maybe now it's different because of all those movements :P.
Im pretty sure this is the right code, except in my game I changed the last number to 10 to make it last longer because I thought that maybe the problem but it wasn't lol. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 12 Jan 2014 10:36 PM |
| Bump. Still having trouble with this :P. |
|
|
| Report Abuse |
|
|
| |
|
Thaeh
|
  |
| Joined: 05 Feb 2011 |
| Total Posts: 7685 |
|
|
| 13 Jan 2014 11:23 AM |
when this happens to me it's because i do something with the camera while it's interpolating, cancelling the interpolation.
like, i interpolate for five seconds but two seconds after i interpolate i change the camera again |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2014 11:26 AM |
Oh ok.
Does the script pause while doing the camera interpolation, or right after the interpolation code do I have to add a wait() for the same amount of time I am interpolating for so that the script pauses?
I think this is what's going on, thanks. Just not sure how to fix it :P. Is using wait afterwards the way to go? |
|
|
| Report Abuse |
|
|
Thaeh
|
  |
| Joined: 05 Feb 2011 |
| Total Posts: 7685 |
|
|
| 13 Jan 2014 11:31 AM |
| yeah add a wait equal to the interpolation time |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2014 11:51 AM |
OMG Lol. The problem had nothing to do with Interpolate, but the script failing to get through an if-then statement xD.
Thanks for your help though!!! |
|
|
| Report Abuse |
|
|