HELP! What is minecraft's gravitational constant?

Discussion in 'Plugin Development' started by TheButlah, Apr 6, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    TheButlah

    Hey guys, I wanted to create a turrets plugin that shoots arrows at players. I decided to do this by making a function that would take three imputs: shooter location, target location, and airtime of the arrow and set the arrows initial velocity corresponding to said inputs. After doing some maths, I got the following formula:
    x-component of vector = difference in x values/airtime
    y-component of vector = (difference in y values + G/2*airtime^2)/airtime

    this assumes that there is a constant gravitational acceleration, no air resistance, and that the target and shooter are aligned properly along x and y axis. My question is twofold:

    1. Does minecraft's gravity of projectiles work like in real life, where there is a set acceleration, or is there a non-constant acceleration, or is it even derpyer than that?
    2. If acceleration is constant, what is the graviational constant(i.e. acceleration due to gravity) for ARROWS in specific. I am aware that there may be different accelerations for different objects. If you know their gravitational constants, feel free to let me know, but I am primarily concerned with arrows.

    Ive already watched a few videos, such as and read this http://www.minecraftforum.net/topic/279812-rebuttal-acceleration-of-gravity-in-minecraft/ but many different sources say many different things.

    Looking forward to your replies, as I dont know what to do.
     
  2. Offline

    Burnett1

    Come again?
     
  3. Offline

    smcerm

    AFAIK Minecraft doesn't adhere to gravitational physics. Falling objects don't accelerate.
     
  4. Offline

    devilquak

    TheButlah

    I've made a turret plugin before, albeit one not an autonomous one. If it's too complicated to do what you want, just set the arrow to a very high velocity and shoot it at the player's location, and just set the damage to what a normal arrow would be using Metadata.
     
  5. Offline

    justcool393

    From the Minecraft Wiki Entites page:
    [​IMG]
    Apparently, for arrows and thrown objects (eggs, snowballs, potions, etc.), drag is applied before acceleration.
     
  6. Offline

    TheButlah

    Thank you so much! This is exactly what I am looking for! I can't believe that I forgot to check the Minecraft Wiki. /me derps
     
  7. Offline

    justcool393

    No problem :)
     
Thread Status:
Not open for further replies.

Share This Page