Frictional Games Forum (read-only)

Full Version: Question about, FadePlayerRollTo
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
everytime i try to use it, it never works right. ive tried differnt combinations, and copied and pastes peoples script, and it always does the same thing. the characters head will turn sideways, but it just like vibrates real fast everytime. im not really sure whats going on.

anyone know what im doing wrong? or why its happening?
here's a small example of script i used and it happend.



FadePlayerRollTo(50, 220, 220);
SetPlayerCrouching(true);
FadeOut(3.0f);
ChangeMap("TestMap2", "PlayerStartArea_1", "", "",);

FadePlayerRollTo(50,220,220);

I almost use the same FadePlayerRollTo as you do, mine also vibrates but isn't that how it's supposed to be? I mean, I like it! Blush
Code:
void FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);

Rotates the position of the camera on the player's body.


afX - angle of rotation of head, positive being counter-clockwise
afSpeedMul - speed (possibly acceleration) multiplier of the rotation (default 1, which is really slow)
afMaxSpeed - maximum speed of rotation

If you inspect it closely -> Then Angle of rotation is how much you rotate to what angle.

afspeedmul means how fast you want to slow it. More you put, faster it goes. If you pit it too fast, it will start vibration as it can fix itself to your desired rotation. Reduce it smaller Smile (Not sure, but I think so)

afMaxSpeed -> I am not sure of that myself, but i guess you should use same as afspeedmul