お疲れ様さまです
【やりたいこと】
・マウスカーソルの方向にMeshを回転させたい
【現状】
・回転自体はできましたが、何故か90度ずれて回転してしまいます
以下に実装したBPを添付します
MeshのRotateは-90度に設定してあります
Twitterに動画も添付してますので合わせておねがいします
お疲れ様さまです
【やりたいこと】
・マウスカーソルの方向にMeshを回転させたい
【現状】
・回転自体はできましたが、何故か90度ずれて回転してしまいます
以下に実装したBPを添付します
MeshのRotateは-90度に設定してあります
Twitterに動画も添付してますので合わせておねがいします
Thank you for your response.
It is not my intention to rotate in the X direction.
I would like to rotate in the Z direction.
How can I do that?
I understand you want to rotate in Z, but LookAtRotation will always point the X vector at the target.
If I want my turret to point the gun at the target, the X vector must be along the gun
Notice, I have my gun ( cylinder ) attached to the turret cube, so I just need to move the turret. The X of the turret is facing along the gun
Yours is like this
so ‘lookat’ will point the side of the turret at the target.
I’ve been thinking about it for a day and thanks to you I know what caused it.
Thank you!