Hello, is there any way i can het position to the right of the player

Started by kamensh4ik on

Topic category: Help with modding (Java Edition)

Last seen on 10:34, 13. May 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello, is there any way i can het position to the right of the player

Hello, is there any way i can het position to the right of the player (at edge of FOV kinda) by using "x/y/z offset of look vector". So I was trying to make projectile hitscan weapon (its working, if anybody needs I'll drop screenshot), and the particles spawn in the middle of player's view, I and tried to shift them to the right (relative to the player, ofc), but anything seems to work

Last seen on 07:25, 16. May 2024
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
try to start to spawn the…
Mon, 04/29/2024 - 20:30

try to start to spawn the particule at :
- X + Z look offset 
- Y
- Z + X look offset 

If you look straight forward, Look X should be at 1 and Look Z at 0 so the particle should spawn at Z+1 of you (so the right) and it should adapt when rotating

(i'm writing this from blur memory so might not be 100% exactr, some tweak might be needed)

Last seen on 07:25, 16. May 2024
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i did some quick test and it…
Mon, 04/29/2024 - 20:45

i did some quick test and it is actually 

- X - Z look offset 
- Y
- Z + X look offset 
 

The only issue is that when the player look down, the X and Z offset go both to 0... Making that the particules renders at the position of the player