Giter Club home page Giter Club logo

Comments (4)

Leirof avatar Leirof commented on June 8, 2024

There is already 3 ways to make it:

  • Without Glibs: roate the armor_stand and TP the other one locally at the same position in a loop (using ^x ^y ^z coordinates). THen the second one will appear to orbit around the first one.
  • Using the link module, which is basically the same, but it allow to adjust the distance, the angle etc. in short, you have better controle on the movement. To do so, you have to link the second entity to the first one using glib.link:create_link_ata and then run in a loop glib.link:keep_local_location. ⚠️ My last tests on this module showed some bugs, so maybe it will not work properly.
  • Using glib.vector and glib.move modules to create a realistic (but also very complex) gravity. You can define an initial vector for the second entity wich represent the tangential speed, define a mass for the two objects (or only the second one if you want the first one to be fixed) and then in a loop, you apply the gravity formula to simulate the acceleration : v = G*M/r^2 * s (with v the new speed vector, G the gravitational constant, M the mass of the attractive body, r is the distance vector between the two objects and s is the time spent before the last actualisation, so 1 tick, so 0,05 second). Once you have this new vector v, you add it to the previous one and you apply the movement using glib.move:by_vector

Good luck! 🤣

If you want help, do not hesitate to ask! ;)

from bookshelf.

TretinV3 avatar TretinV3 commented on June 8, 2024

I don't want gravity I want an observatory

from bookshelf.

Leirof avatar Leirof commented on June 8, 2024

Oh ok, sorry I read too fast haha ^^'

from bookshelf.

Leirof avatar Leirof commented on June 8, 2024

@ascpial got another idea to create a real astronomy module: being able to get the phase of the moon

from bookshelf.

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.