ecctrl icon indicating copy to clipboard operation
ecctrl copied to clipboard

How to set the rotation of character?

Open madspace1112 opened this issue 1 year ago • 8 comments

madspace1112 avatar Jun 20 '24 01:06 madspace1112

You can set characterInitDir. It's in rad

ErdongChen-Andrew avatar Jun 20 '24 17:06 ErdongChen-Andrew

Thanks for your reply. But, I need to set the rotation of character while playing the character no init direction.

madspace1112 avatar Jun 20 '24 18:06 madspace1112

You want to rotate the character while playing? I don't quite understand.

ErdongChen-Andrew avatar Jun 20 '24 20:06 ErdongChen-Andrew

https://github.com/pmndrs/ecctrl/assets/145017971/c265dcfb-0b97-4811-a44c-68837ff0d24c

I would like to set the rotation while playing the character. Current, when sit down, my character keeps init direction.

madspace1112 avatar Jun 22 '24 01:06 madspace1112

I see. I think the best way is to rotate the character model when it sits down. You can give the model a ref to do the rotation

ErdongChen-Andrew avatar Jun 22 '24 04:06 ErdongChen-Andrew

I can rotate the rigid body, is there no way to set the camera rotation without using input controls?

DennisSmolek avatar Aug 16 '24 12:08 DennisSmolek

@DennisSmolek You can’t rotate the camera after initialization. I might add that feature later.

ErdongChen-Andrew avatar Aug 16 '24 16:08 ErdongChen-Andrew

@DennisSmolek looks like it is already implemented in the last commit from @ErdongChen-Andrew . You can check here: https://github.com/pmndrs/ecctrl/commit/8b35a75284d2eb29aae430aa7c4f26a17f788aab#diff-c4100983dec4e8385928688771faf11771f6882864edd910b2472b32f1c1b900R870 In short, use refs and rotateCamera or rotateCharacterOnY methods

mskarpushchenko avatar Jan 10 '25 17:01 mskarpushchenko