Hey @prime31, loving Nez! Really going to push it (and Monogame) when the project is finished. I think Nez should be officially added to the Monogame family as the optional layer that sits above MG when an EC(S) framework is needed.
Anyway, I’ve used ProjectileMover and noticed the move always returns true because “neighbours” contains the projectile’s collider and then checks overlaps() with itself. Strangely the NezSample NinjaGame works but I think that’s because you’re specifying a layer which I’m not (and I don’t see why specifying a layer would stop it returning itself)?
Wondering if boxcastBroadphase shouldn’t be boxcastBroadphaseExcludingSelf instead?
Here’s the current method for move() in ProjectileMover:
/// moves the entity taking collisions into account
/// <returns><c>true</c>, if move actor was newed, <c>false</c> otherwise.</returns>
/// <param name="motion">Motion.</param>
public bool move( Vector2 motion )
if( _collider == null )
var didCollide = false;
// fetch anything that we might collide with at our new position
entity.transform.position += motion;
// fetch anything that we might collide with us at our new position
var neighbors = Physics.boxcastBroadphase( _collider.bounds, _collider.collidesWithLayers );
foreach( var neighbor in neighbors )
if( _collider.overlaps( neighbor ) )
didCollide = true;
notifyTriggerListeners( _collider, neighbor );