- Home /
rotating a bone slows down frame rate considerably
I have an update loop that slows down considerably --going from 30fps to about 9 if I add the lines below that are commented out. The project moves a character's feet depending on the mouse position.
Is there anything inherently slow about any of the commented lines?
if(sidestep==true){
if(boneY.name==hip || boneY.name==leftthigh){
return;
}
else{
var steprotation=.1*((mousevec.x-Screen.width/2)/(Screen.width/2));
var steprotation2=.1*((mousevec.x-Screen.width/2)/(Screen.width/2));
//hipgo.transform.rotation.z=steprotation;
//leftthighgo.transform.rotation.z=-steprotation2;
//leftfootgo.transform.rotation.z=steprotation2*.1;
//rightthighgo.transform.rotation.z=steprotation2;
//rightfootgo.transform.rotation.z=-steprotation2*.1;
}
}
Comment
Answer by harko12 · Nov 13, 2012 at 02:25 AM
Well this may not help much but I've heard its more efficient to multiply by .5 than to / by 2
Your answer
Follow this Question
Related Questions
Mecanim 'extra' root bone rotation 0 Answers
Bone weight set/get is very slow?? 2 Answers
Player Chest rotates always in the same direction 0 Answers
Why is my build running so slow despite running fine in editor? 2 Answers
Cant slow down rotation Speed 1 Answer