How to add recoil to a ranged weapon?

Started by MiTerSkyArk on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to add recoil to a ranged weapon?
Fri, 06/07/2024 - 02:00 (edited)

I am trying to make it so when I shoot my cannon weapon, it forces me in the opposite direction, but I can't figure it out. help?

Edited by MiTerSkyArk on Fri, 06/07/2024 - 02:00
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could override the…
Mon, 07/22/2024 - 03:42

You could override the movement to the opposite of the look angle vectors ( you will mostlikely want to divide these)

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I alredy made something very…
Mon, 07/22/2024 - 10:59

I alredy made something very similar to this, basically its an enchantment and whenever you hit a target or just shoot a projectile with the crossbow it knocks both you and the entity, obviously you get sent a bit backwards from where you shoot and the entity that got hit gets sent far back. you can modify these vallues hoveer you want

https://imgur.com/a/qCEs7WT

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
WAIT I  FORGOT TO ADD…
Mon, 07/22/2024 - 11:03

WAIT I  FORGOT TO ADD SOMETHING DONT COPY YET

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
nevermind it works im just…
Mon, 07/22/2024 - 11:11

nevermind it works im just very stupid