Alternative to using torque

I have a space ship and I am trying to make it turn with the mouse. I have some code now that works, but the problem is that the code utilizes torque, which means my player can not be kinematic. I NEED the player to be kinematic for many, many reasons. I will post my code below, but is there any other substitute or method I can use to rotate the player?

if(Input.GetAxis(“Mouse X”) > 0){
}

if(Input.GetAxis(“Mouse X”) < 0){
}

if(Input.GetAxis(“Mouse Y”) > 0){
}

if(Input.GetAxis(“Mouse Y”) < 0){
}

}

Does anyone know what I can use to rotate the player besides torque? Thanks in advance

yes, using Quaternion.RotateTowards() : Unity - Scripting API: Quaternion.RotateTowards
but you will have to construct you rotation based on mouse position.

You should consider Transform.Rotate() or RigidBody.angularVelocity.

Transform.Rotate() is working very nicely, now im just trying to smooth it but im sure I can find that somewhere. Im not too script savvy

use mathf.lerp on values or vector3.lerp. rotatetowards does the same thing as lerp

Lol I looked at rotatetowards and in my mind I go “ughhhhhhhh”. Ive self-taught myself most scripting I know, but im still not too savvy in more complex methods.

It would be helpful for you to actually explain how you want the ship to move rather then “with the mouse”.

The camera is behind the player, the W and S keys make the ship speed up or slow down, A and D makes the ship rotate, and moving the mouse left, right, up, or down will rotate the ship in that direction. I will upload a webplayer in just a sec

OK, that would be helpful because your last description was as bad as the first. If the person moves the mouse, how should the ship react? If you say “rotate”, then nobody can help you. Does moving the mouse rotate the ship on a linear distance:angle relationship or does it apply a rotational velocity or does it set a target rotation based on a cursor (or other indicator)?

The camera is using the new suggestion I got on this thread, and so you see it is sporadic, I am trying to smooth out this movement

Checking it out now.

OK, that movement is really, really dreadful, isn’t it? Perhaps you need an indicator of the new direction (like in the X Universe games) and then the ship should turn towards that new facing on a curve (accelerating to its max rotational speed, then slowing as it nears the proper facing).

In that particular case, the Quaternion.RotateTowards() would be pretty handy.

You need to decide how you want this thing to move, when you have that, I think we can help you get it.

I know how I want it to move, at least of this moment. I may change it later down the development process, as Im sure you could tell this is still in early development stages. I want to know how to smooth the camera movement in a line of code reading

transform.Rotate(Vector3.up * turnSpeed); <. This makes the camera sporadic, as is proved by my webplayer, and I now want to know how to actually smooth that movement, so the camera is not as “jumpy”.

ar0nax, would you mind helping me in constructing a rotation based on the mouse position? this completely confuses me

You should look into MouseLook script from the Character controller from Standard packages in unity.