- Home /
Bullet capsule always standing upright
I am Instantiating a Capsule GameObject that will act as a bullet and it always is standing up even if I change the rotation.
Here is the code I'm using to create it:
GameObject clone = GameObject.Instantiate(prefab, transform.position, transform.rotation) as GameObject; and for the prefab's script:
rigidbody.AddForce(transform.forward * 856); I tried changing the rotation on the object but nothing seems to work. Any suggestions? Again, I'm not trying to have it rotate all the time after it's created, I just need it to be pointing forward instead of standing upright.
Thank you.
Answer by Noah-1 · Feb 04, 2011 at 03:25 AM
Try changing the prefab rotation and save it, tha should work, if it does not work just change your capsule for a sphere.
Good Luck.
prefab rotation didn't work but using a sphere might be good enough. Thank you.
Answer by Devlus · Feb 04, 2011 at 04:04 AM
if you click the freeze rotation tick box in the inspector for this object (under the rigidbody component) it should "freeze rotation" of the object
I'm not sure y you reposted this either, but as i said in the thread identical to this is that you can rotate the spawnpoint to the desired rotation for the object, and then freeze the rotation