So I’ve tried to translate some of the 2D tutorial scripts to C#. I thought it was fairly easy until I ran the game and my character just flew away… I’ve been trying to find the problem but no success. It can be something I have mistranslated or misspelled.
My #1 culprit is this line:
// Calculate actual motion
var currentMovementOffset = movement.direction * movement.speed + Vector3 (0, movement.verticalSpeed, 0) + movement.inAirVelocity;
Best I can do is:
// Calculate actual motion
Vector3 currentMovementOffset = movement.direction * (movement.speed + movement.verticalSpeed) + movement.inAirVelocity;
I just can’t figure it out.
Here is the whole script, if anyone could be so kind and help me out or at least point me into the right direction, I would be ever so grateful!
279404–10019–$player13_205.cs (12.2 KB)