Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new weapon: laser #7

Open
6 of 10 tasks
0XDE57 opened this issue Jan 31, 2023 · 7 comments
Open
6 of 10 tasks

new weapon: laser #7

0XDE57 opened this issue Jan 31, 2023 · 7 comments
Assignees
Milestone

Comments

@0XDE57
Copy link
Owner

0XDE57 commented Jan 31, 2023

Laser component: a raycast with reflection off objects.

  • laser render and raycast
  • reflection
    • albedo
  • damage
  • asteroid slicing: laser cuts polygon at intersection.
  • refraction: GLASSTEROIDS!!!!! (eg: where n1 = 1 (vacuum) and n2 = 1.5 (glass))
  • tracktorbeam: push/pull laser? (apply force at raycast point of contact)
  • move tracktorbeam laser ability into own component purchasable at space station
  • laser better render #50
  • player can cycle through current equipped weapon/tool: cannon, laser

Asteroid could be given a reflective index (albedo) from [0 to 1]
Where 0 does not reflect, and 1 reflects 100% of the beam.
0.5 would reflect 50% of the beam, beam dims accordingly.

Asteroid heats up with laser exposure, based on % not reflected?

@0XDE57
Copy link
Owner Author

0XDE57 commented Apr 6, 2023

Image

Image

@0XDE57
Copy link
Owner Author

0XDE57 commented Apr 11, 2023

@0XDE57
Copy link
Owner Author

0XDE57 commented Oct 29, 2023

@0XDE57
Copy link
Owner Author

0XDE57 commented Nov 5, 2023

@0XDE57
Copy link
Owner Author

0XDE57 commented Nov 17, 2023

Slice: we get the entry point from the first raycast, but how do we get the exit point for the laser?
Answer: perform another raycast! but flip the start and end point, so the ray is cast from the end point of the laser towards the caster. eg:

world.rayCast(callback,p1,p2); //entry point
world.rayCast(callback,p2,p1); //exit point

https://www.emanueleferonato.com/2021/04/22/slicing-splitting-and-cutting-html5-box2d-physics-bodies-using-phaser-planck-js-and-polyk/

@0XDE57
Copy link
Owner Author

0XDE57 commented Mar 23, 2024

@0XDE57 0XDE57 added this to the alpha milestone Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

1 participant