Made Laser Eyes! When you click the laser button which you can change in the controls menu, a particle will appear (which is purely visual) and it will make a raycast, targeting the nearest entity/block. It will damage an entity and turn the block into a redstone block (temporary until i feel like making ash). It also works in multiplayer, where the particles are summoned from the eye of the shooter from everyones persepective except the shooter who only sees the beam if a few blocks away that way they don’t get blinded by particles (the pictures use free cam and i have no friends so I can’t show this but u can see how it works in the code)
My project didn’t have documentation so it was difficult figuring out how to make a raycast (combination of .clip and .getEntityHitResult) and how to tell if the player really pressed the laser button which requires client to server packet management.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.