Flashlight.re.ts 328 B

1234567891011121314151617
  1. import * as RE from 'rogue-engine';
  2. export default class Flashlight extends RE.Component {
  3. awake() {
  4. }
  5. start() {
  6. this.object3d.getObjectByName("Spotlight")?.lookAt(this.object3d.position.x, this.object3d.position.y -0.4, this.object3d.position.z - 1)
  7. }
  8. update() {
  9. }
  10. }
  11. RE.registerComponent(Flashlight);