Solved Vectors?

Discussion in 'Plugin Development' started by civ77, Oct 6, 2012.

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

    civ77

    How do vectors work as far as projectiles are concerned in minecraft/bukkit? AFAIK projectiles have some kind of drop but the vectors have no acceleration or velocity, just a coordinate, what is this coordinate? the block it is going to hit, the block the player is looking at, something else?
     
  2. Offline

    andf54

    Projectiles have velocity vectors, not coordinate vectors (that is what Locations are for).

    Projectile falls because the velocity vector y component is reduced by dy each block/tick/whatever.

    I hope I understood what you meant.
     
    civ77 likes this.
  3. Offline

    civ77

    What is this type called? also does the server/minecraft decrease the y velocity or do the vectors have acceleration?
     
  4. Offline

    andf54

    What do you mean by type?

    A vector is just something that has a direction. That something might be acceleration, electric field or anything else you want. If we are talking about entity.getVelocity(), then it's a velocity vector. As far as I know, mc doesn't have a literal acceleration vector.

    (Constant) vectors don't have acceleration.
     
  5. Offline

    civ77

    by type I meant something like int, string, float, entity, etc.
     
  6. Offline

    andf54

    Double
     
  7. civ77 If you still don't understand:
    the "coordinates" are the direction and speed.
    So 1.0D on the Y axis would move it upwards, -1.0D downwards. But beware that 1.0 may be way to fast. Just experiment with that.
     
    kroltan and civ77 like this.
  8. Offline

    civ77

    thanks, I was thinking it was a distance or target coordinate. SOLVED
     
Thread Status:
Not open for further replies.

Share This Page