I have tank kind of vehicle.
But i am facing issue with rotation of top main weapon rotation.
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.
Any suggestion will be helpful…
tried clamping the rotation?
Nope… I did not tried it…
Thanks for trying to help!
Thanks @yaustar It worked!
I did same…
Placed empty entity right above and below main weapon…
var BalancerVal = new pc.Vec3().sub2(this.topBalancer.getPosition(), this.bottomBalancer.getPosition());
Thank you very much!