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
  Can you move generated objects along spline? FernDigestive 1 8 04-02-2023, 12:14 PM
Last Post: _Aka_
  Feature Request-move UI elements in SceneView spawnstorm 5 20 09-17-2022, 12:37 PM
Last Post: _Aka_
Wink In SplineController OnPositionReachedList Event is missing shimizu 2 13 02-07-2022, 12:47 PM
Last Post: shimizu
  best way to rotate, change offset, and inset position of splinecontroller object smackledorf 1 24 01-17-2022, 01:39 PM
Last Post: _Aka_

Forum Jump: