[SOLVED] Issue with Rotation

Hello,

I have tank kind of vehicle.

But i am facing issue with rotation of top main weapon rotation.
image
image

Currently i am using lookAt (where it is looking towards box which is right in front of cam) and it is giving me this kind of result.

chrome-capture (1)

Any suggestion will be helpful…

tried clamping the rotation?

This looks like the same as 3D Face Tracking in PlayCanvas using TensorFlowJS

2 Likes

Nope… I did not tried it…
Thanks for trying to help! :slight_smile:

Thanks @yaustar It worked! :love_you_gesture:t2:

I did same…

Placed empty entity right above and below main weapon…

var BalancerVal = new pc.Vec3().sub2(this.topBalancer.getPosition(), this.bottomBalancer.getPosition());
this.mainWeaponHolderPoint.lookAt(this.weaponAxisLockPoint.getPosition(), BalancerVal);

Thank you very much! :ok_hand:t2: