[TUTORIAL] How to fix particles and other elements to the player's camera

Started by Rancio0701 on

Topic category: User side tutorials

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[TUTORIAL] How to fix particles and other elements to the player's camera
Fri, 01/02/2026 - 18:46 (edited)

The attached procedure will allow you to place elements like particles, entities and rendered shapes in a position relative to the player's location and head movement: this will fix the element to a certain point, which can be useful for creating certain effects (in the example below I summoned flame particles above the player’s hand; for this demonstration I used an animation which also follows the player's head movement).

THE ANIMATION AND THE PANEL SHOWN IN THE VIDEO ARE NOT PART OF THE PROCEDURE, THEY WERE ADDED SEPARATELY FOR DEMONSTRATION PURPOSES ONLY 
 

https://imgur.com/iCeZgnQ

https://mega.nz/file/zMsSlLBJ#hMHhNzaZBKsCqSfrYBjTtA6HU2GIs-tk0OEG1ACe_…

There are 4 main variables you can change the value of to place your effect wherever you want: pivot and ypivot represent the coordinates of the pivot point while offset and yoffset describe the offset point, which is the actual location where your element will appear in game.

  • pivot, the horizontal distance of the pivot point from the origin (the origin is the point with coordinates [0,0,0], found between the feet of the player)
  • ypivot, the vertical distance of the pivot point from the origin
  • offset, the horizontal distance of your effect from the pivot point
  • yoffset, the vertical distance of your effect from the pivot point; it's equal to the difference between the Y coordinate of the offset point and the pivot's (after being converted into Minecraft coordinates)

To get the exact coordinates of your different body parts you can open a model of the player in Blockbench (to do that you can create a Minecraft Skin project with the player's model and then convert it into a Modded Entity), then create a new element (like a cube or a locator) and move it to the desired spot; now you need to convert your values into Minecraft coordinates, to do that simply divide them by 16 -in Blockbench "1 position = 1 pixel" while in Minecraft "1 position = 1 block (which is made of 16 pixels)".

pivotoffset

To get the pivot's coordinates in Blockbench you need to move along the frontal axis, for the offset point you need to move on the sagittal one, so if your model is facing the north it means that you need to consider the X and Y coordinates for the pivot and the Z and Y for the offset point. 

Keep in mind that yoffset = (Y coord. offset point - Y coord. pivot point) / 16

Edited by Rancio0701 on Fri, 01/02/2026 - 18:46