Hot answers tagged

1

In Unity, you usually don't need to check if the movement destination is free, because collision detection and resolution can be handled by the engine. When you use rigidbody movement, then the engine will do so automatically and just not move the rigidbody when there is an obstacle in the way. Or if that object has a dynamic rigidbody, it will push it out ...


1

You probably figured it out by now, but I'll answer since no-one else has. Basically, it's a lambda function declaration called like: v(aVec, aFloat); The -> arrow part is a late return type, (just pretend what comes after gets put where the auto is). The [] brackets say what variables the function needs to know about, so it can use them. yea...should ...


Only top voted, non community-wiki answers of a minimum length are eligible