Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Rotating a rigidbody is faster than changing the euler angle?

$
0
0
I have two different methods for rotating my characters, where direction is a float from 0-359:
Code (CSharp):
  1. rigidbody2D.rotation = direction;
  2. transform.localEulerAngles = new Vector3(0f, 0f, direction);
When I use the method on the first line with 1500 characters all rotating I get speeds of around 700fps.
When I use the method on the second with 1500 characters all rotating I get speeds of around 60fps.
I tested this with multiple computers (three to be exact) all with vastly different...

Rotating a rigidbody is faster than changing the euler angle?

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>