ecctrl icon indicating copy to clipboard operation
ecctrl copied to clipboard

When camCollision is disabled, camInitDir is initially ineffective.

Open eugle opened this issue 1 year ago • 4 comments

<Ecctrl					
  camInitDir={{ x: 0.4, y: 0 }}
  camCollision={false}>
  <EcctrlAnimation
	  characterURL='/models/tribal.gltf'
	  animationSet={animationSet}>
	  <Character position={[0, -0.9, 0]} />
  </EcctrlAnimation>
</Ecctrl>

When camCollision is disabled, camInitDir is initially ineffective.

Upon the first load, the specified camInitDir angle is not applied, and the default camera view is used instead. When the user tries to adjust the camera using the mouse, it immediately switches to the angle set by camInitDir, which feels awkward for the user.

Thank you for your package, it's excellent.

eugle avatar Jul 31 '24 12:07 eugle

https://github.com/user-attachments/assets/bad73f58-c512-40af-bee5-6f927aa7d1af

Works fine on my end 🤔

ErdongChen-Andrew avatar Jul 31 '24 22:07 ErdongChen-Andrew

@ErdongChen-Andrew Thank you for your response. Here's the situation: when you use camInitDir={{ x: 0, y: 1 }}, everything works fine, just like in your demo video. However, when you use camInitDir={{ x: 1, y: 0 }}, the issue I mentioned occurs. Additionally, I found that when I set camInitDir={{ x: 3, y: 0 }}, the viewport cannot move up and down. Could you try it and see? It's quite strange.

eugle avatar Aug 01 '24 13:08 eugle

Good point, @eugle! This is a really interesting bug though. It should be fixed in the new version 1.0.87. Give it a try.

ErdongChen-Andrew avatar Aug 01 '24 23:08 ErdongChen-Andrew

Looking forward to it. Thank you for your patient response.

eugle avatar Aug 02 '24 12:08 eugle