Coder Social home page Coder Social logo

Comments (6)

SIGSTACKFAULT avatar SIGSTACKFAULT commented on June 23, 2024 1

If Dir3 gets it then Quat should too

from bevy.

alice-i-cecile avatar alice-i-cecile commented on June 23, 2024

I definitely want this: very useful!

This feels like something that could be added as an auto-implemented method on the Animatable trait. Does that make sense to you?

You would probably need to special case the spherical interpolation in some form. Perhaps a newtyped Vec2/Vec3 that captures the notion of operating in spherical coordinates?

from bevy.

IQuick143 avatar IQuick143 commented on June 23, 2024

Perhaps a newtyped Vec2/Vec3 that captures the notion of operating in spherical coordinates?
How about a Dir2/3, it's already a newtyped Vec2/3, bound to the unit sphere.

from bevy.

alice-i-cecile avatar alice-i-cecile commented on June 23, 2024

Dir2 and Dir3 are a great primitive for this, and interpolating them should definitely be on the surface of the n-sphere. I think that's probably enough actually, as long as we have an example that shows how to use those interpolation methods to create a spherical path around a center between two points.

from bevy.

vveisard avatar vveisard commented on June 23, 2024

This feels like something that could be added as an auto-implemented method on the Animatable trait. Does that make sense to you?

Yes, Animatable seems like the right place for a smooth_damp method. However, I would expect a smooth_damp method for f32, Rotation2d, Vec2, Vec3, Dir2, Dir3, and Quat, and some of those lack an Animatable implementation.

I'm not familiar enough with Rust to know if auto-implement is the right thing to do.

from bevy.

alice-i-cecile avatar alice-i-cecile commented on June 23, 2024

Pretty much all of those should have an Animatable implementation :) But yes, this can just be a method on the trait with a default implementation of the method.

from bevy.

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.