Nez.Portable/ECS/Components/Physics/ProjectileMover.cs
/// <summary>
/// moves the entity taking collisions into account
/// </summary>
/// <returns><c>true</c>, if move actor was newed, <c>false</c> otherwise.</returns>
/// <param name="motion">Motion.</param>
moves the entity taking collisions into account
moves the entity taking collisions into account
public bool move(Vector2 motion)
        {
            var didCollide = false;
            entity.transform.position += motion;
            var neighbors = Physics.boxcastBroadphase(_collider.bounds, _collider.collidesWithLayers);
            foreach (var neighbor in neighbors)
            {
                if (_collider.overlaps(neighbor))
                {
                    didCollide = true;
                    notifyTriggerListeners(_collider, neighbor);
                }
            }
            return didCollide;
        }
public bool move ( Vector2 motion ) { var didCollide = false ; entity . transform . position += motion ; var neighbors = Physics . boxcastBroadphase ( _collider . bounds , _collider . collidesWithLayers ) ; foreach ( var neighbor in neighbors ) { if ( _collider . overlaps ( neighbor ) ) { didCollide = true ; notifyTriggerListeners ( _collider , neighbor ) ; } } return didCollide ; }
moves the entity taking collisions into account
moves the entity taking collisions into account
// fetch anything that we might collide with at our new position // fetch anything that we might collide with us at our new position
None
motion
Vector2
None