Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

spin with rigidbody 2d unity

    public Rigidbody2D rigidBody2D;

    void Start()
    {
        rigidBody2D = GetComponent<Rigidbody2D>();
        rigidBody2D.rotation = 45f;
    }

    void FixedUpdate()
    {
        rigidBody2D.rotation += 1.0f;
    }
 
PREVIOUS NEXT
Tagged: #spin #rigidbody #unity
ADD COMMENT
Topic
Name
2+8 =