- Home /
Question by
AaronLeeIV · Feb 24, 2015 at 01:18 PM ·
c#rotationcollision event
When I rotate a prefab, only the collider rotates, the mesh is not
What's wrong with this script?
using UnityEngine;
using System.Collections;
public class Rotater : MonoBehaviour {
public float RotateSpeed = 20f;
void FixedUpdate () {
transform.Rotate (Vector3.up * Time.deltaTime * RotateSpeed, Space.World);
}
}
capture.png
(50.5 kB)
Comment
Aren't you supposed to rotate the rigidbody ins$$anonymous$$d? And everything just follows.
Your answer
Follow this Question
Related Questions
Flip over an object (smooth transition) 3 Answers
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
3D Heat Seeking Missile (C#) - Odd problem 1 Answer
Trouble with Camera Rotation Math 2 Answers