Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Move SplineController in rhythm of song
#10
(05-15-2019, 05:09 PM)_Aka_ Wrote: Just modify the ChaseCam script to keep the transform.position.y constant.
There are different ways of doing this. One could be to modify the MoveTo position to keep it's Y coordinate constant. You can also modify the Y coordinate of the interpolated position. The core idea is to override the Y coordinate at each update.

Thanks, but It did not help. I tried to fix Y position of Camera in LateUdate:
if (MoveTo)
{
   if (moveHeight < 0) //init fixed camera height value
   {
       moveHeight = MoveTo.position.y;
   }
   Vector3 pos = MoveTo.position;
   pos.y = moveHeight;
   
   transform.position = Vector3.SmoothDamp(transform.position, pos, ref mVelocity, ChaseTime);
}

I think the point is that the camera is not exactly behind the player (please look at the attached screenshot), and not only the Y coordinate changes during the jump. As I see all coordinates change the value, so it's harder to solve this problem.


Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
RE: Move SplineController in rhythm of song - by electricpunch - 05-16-2019, 07:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Play() does not cause SplineController to produce expected behaviour ConCat 8 1,390 02-08-2026, 11:54 AM
Last Post: _Aka_
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 4,468 07-29-2025, 09:15 PM
Last Post: _Aka_
  Player move with object mcarman 4 2,987 07-29-2024, 06:49 PM
Last Post: mcarman
  Can you move generated objects along spline? FernDigestive 1 1,404 04-02-2023, 12:14 PM
Last Post: _Aka_

Forum Jump: