adrianhajdin / project_threejs_ai

https://jsmastery.pro
893 stars 267 forks source link

easing.dampE not Working #19

Open Asura-Ang opened 1 year ago

Asura-Ang commented 1 year ago

When I am using

easing.dampE(
    //   group.current.rotation,
    //   [state.pointer.y / 10, -state.pointer.x / 5, 0],
    //   0.25,
    //   delta
    // );

with <Environment preset="city" />

Then I am getting this error

CameraRig.jsx?t=1686343803010:44  Uncaught TypeError: Cannot read properties of undefined (reading 'rotation')
    at Object.current (CameraRig.jsx?t=1686343803010:44:32)
    at render$1 (index-22ee0173.esm.js:1516:22)
    at loop (index-22ee0173.esm.js:1543:19)

and when I am commenting it the error is gone but the functionality is lost. Please help me with this issue I am stuck for 2 days now .

SoumyaSubhrajit commented 1 year ago

@Asura-Ang I think the group.current is the reading undefined what you can do is Double-check the code where the group is defined and make sure it is initialized correctly. Manually you can do add test case by simpley iterate upon the object If you still see the error again feel free to reach me in here.

Ayman-aa commented 1 year ago

I'm facing the same problem, if I deleted the useFrame, but with the useFrame, I'm having new problems, the same error but with pointer and camera undefined

Ayman-aa commented 1 year ago

I shut down my laptop yesterday and today the code is working, idk why or how but wow

pradeepthsjain commented 1 year ago

As soon as i click on ai full or ai logo button my screen goes white and i can see errors on the server terminal and even in inspect console. Screenshot (8) ![Screenshot (9)](https://github.com/adrianhajdin/project_threejs_ai/assets/115602871/712d6f9b-014d-4565-a1fd Screenshot (10) -8d91beeafb68) Screenshot (11) Can someone please help me out with this....?