Git Product home page Git Product logo

Comments (7)

ufrshubham avatar ufrshubham commented on May 18, 2024

It depends on what the camera is following. If the component it is following moves smoothly, the camera should move smoothly too.

from flame.

spydon avatar spydon commented on May 18, 2024

Just set the maxSpeed argument in camera.follow to something lower and it will move smoothly.

from flame.

devchenli avatar devchenli commented on May 18, 2024

Just set the maxSpeed argument in camera.follow to something lower and it will move smoothly.

Thank you, I think I understand what you mean. However, unfortunately, setting the speed alone is not enough. If you have used Cinemachine in Unity or the Position Smoothing and Drag properties of the Camera in Godot, you will see that they achieve a very good effect. Similar to the protagonist in a movie, when the player only moves a short distance, the camera remains stationary. However, when the player moves a sufficient distance, the camera will follow the movement and accelerate smoothly linearly like a movie lens, rather than simply following the player's movement exactly.

from flame.

ufrshubham avatar ufrshubham commented on May 18, 2024

However, when the player moves a sufficient distance, the camera will follow the movement and accelerate smoothly linearly like a movie lens, rather than simply following the player's movement exactly.

IMO, this can be easily achieved by introducing a follower component which implements these custom following logic. So FollowerComponent tracks Player and camera simply follows the FollowerComponent normally.

It might also be worth it to create a new package similar to cinemachine instead of adding more code to the existing camera.

from flame.

spydon avatar spydon commented on May 18, 2024

It might also be worth it to create a new package similar to cinemachine instead of adding more code to the existing camera.

Maybe we should add a curve argument for the movement, I think that should do it too.

from flame.

devchenli avatar devchenli commented on May 18, 2024

The expected camera movement is like this :

movement.mp4

I would really appreciate it if this functionality could be implemented either by creating a new package(like unity) or adding a curve argument for the movement (like godot) . Thank you all for your consideration.

from flame.

renancaraujo avatar renancaraujo commented on May 18, 2024

I implemented this on Turi by having an invisible position component as constant camera target. Then, by apllying Effects to this component's position (with curves), one can have such effect.

Video for reference: https://twitter.com/i/status/1717496557422141465

from flame.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.