Frictional Games Forum (read-only)
Question about, FadePlayerRollTo - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Question about, FadePlayerRollTo (/thread-13113.html)



Question about, FadePlayerRollTo - Death Icarus - 02-05-2012

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", "", "",);




RE: Question about, FadePlayerRollTo - Tiiwh - 02-05-2012

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



RE: Question about, FadePlayerRollTo - Elven - 02-05-2012

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