Velocity Issue?

Started by BlueAwesomeDinosaur on Tue, 06/09/2020 - 23:54

Topic category: Help with modding (Java Edition)

Last seen on 14:37, 5. Jun 2021
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Velocity Issue?
Wed, 06/10/2020 - 19:52 (edited)

I was messing around with velocity and made an item to track it. I noticed something that explained why I can't use velocity to track player movement. I found that unless the player is off the ground their x and z velocity is always 0. Is there a way to track actual movement of the player and is this a bug?

EDIT: Additionally, flying is not tracked either, so only jumping is tracked by velocity I guess...

Edited by BlueAwesomeDinosaur on Wed, 06/10/2020 - 19:52
Last seen on 23:27, 4. Apr 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Interesting, how exactly you…
Tue, 06/09/2020 - 23:58

Interesting, how exactly you tracked the player velocity?

Last seen on 14:37, 5. Jun 2021
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
If item in main hand is…
Wed, 06/10/2020 - 00:04

If item in main hand is provided item stack or off hand item is provided itemstack then

send message create text with "Current Velocity: " + x velocity of target entity + "X, " + y velocity of target entity + "Y, and" + z velocity of target entity + "Z"

 

This is a more simplified version of the block code, but how it works is pretty simple.  

Last seen on 14:37, 5. Jun 2021
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I simplified it just so I…
Wed, 06/10/2020 - 00:08

I simplified it just so I would not have to write excessive things like "create text with" seven times over and some other things I thought was unnecessary to say.

Last seen on 18:50, 9. Jun 2021
Joined May 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
possibly there is a way to…
Mon, 06/29/2020 - 21:19

possibly there is a way to track the position, then compare it to current position and calculate the velocity with that?

Last seen on 14:37, 5. Jun 2021
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I did find it was just an…
Wed, 07/01/2020 - 19:38

I did find it was just an issue with the join block or something, but I have found bugs involving the velocity block, so if you can you should tend to stay away from it because it can cause problems like ghosting potion effects and such.