hey, how do you get maxDegreesDelta?
im trying to make a rigidbody rotateTowards a click but havent had much luck aside from using Quaternion.LookRotation(which is great but too snappy). help pls
With your code, if your raycast was successful then the code to rotate the object is only executed for that frame.
As you don’t want it to just snap to a rotation, calc a target rotation if your raycast is successful, store it in a variable and then lerp or rotate towards that each frame.
wow, yea youre right. thx for pointing that out. how do you store a variable? (sry for such a noob question… using ‘clickedWorldPoint’ outside of this if statement has been giving me errors lol)
duude. it makes so much sense now. you put the information you want at the beginning so even if it goes through the IFs and what else you can still pull it out and slap it onto a different function. aaaha, its so obvious! you da bes.
with this new info i was able to move things around so the input is taken in by Update and the physics magic is school bussed through FixedUpdate YES. also the rotation is smooth as butta, tysm.