Comments (7)
It depends on what the camera is following. If the component it is following moves smoothly, the camera should move smoothly too.
from flame.
Just set the maxSpeed
argument in camera.follow
to something lower and it will move smoothly.
from flame.
Just set the
maxSpeed
argument incamera.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.
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.
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.
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.
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)
- Change `Forge2DGame`'s `cameraComponent` constructor parameter to `camera` for consistency with `FlameGame`
- Not compatible contact type HOT 1
- Unverified Breakpoint in VSCode. DebugService: Error serving requestsError: FormatException: Unsupported URI form. HOT 6
- Update doc comment on FixedResolutionViewport
- restitution of FixtureDef HOT 5
- Input System should be improve HOT 1
- Doc: In ValuerRoute example you can click the transparent area to spawn multiple route HOT 3
- Tried to access an image "characters/amiy/idle.png" that does not exist in the cache. Make sure to load() an image before accessing it HOT 3
- Can onGameResize automatically stretch the process? HOT 2
- Pixel Anti Aliasing HOT 5
- `AdvancedButtonComponent` doesn't show `downSkin` when changing the route
- Update `flame_audio` to support `audioplayers:^6.0.0`
- Static and kinetic friction feature in forge_2d HOT 7
- Resources are encrypted locally or resources are loaded from memory or resources are packaged into a single file HOT 2
- Only register mouse scroll when key is held down? HOT 2
- Strange problems when using TextBoxComponent
- Because flame_audio 2.10.1 depends on audioplayers ^5.0.0 and no versions of flame_audio match >2.10.1 <3.0.0, flame_audio ^2.10.1 requires audioplayers ^5.0.0.
- [iOS] I get an error when building iOS Archive. HOT 5
- Different behaviour function applyLinearVelocity in windows (120 fps) and android (60 fps) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flame.