-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
X2Effect_Knockback tile trace intersects with ground #1431
Comments
Please ignore the suggested fix, I was too hasty about it. My hypothesis still is that occasionally the I didn't find a function or a variable, that confirms if an Actor is a floor/ground or not I suppose another proposed fix could be either raising the extends, so they don't collide with the floor I did a quick test making it a line trace, and it seemed to work as you would expect, units that didn't get knocked back before did so fine Also despite what I've heard, units that are knocked down get up exactly where you expect them to, thus I don't think it's based on physics |
Having reliable knockback was one of the first things I wanted to accomplish as a modmaker, and yet somehow never managed to it. It sure would be great if you can tackle it. |
…Context_Falling
…ack units can take fall damage and may fly over units, merging logic with visualization trees
In
X2Effect_Knockback : GetTilesEnteredArray
, an if-condition fails to take ground tiles in account and then later prematurely exits the loop and causes KnockbackToLocation to not be where intendedFrom my limited testing case, a trace info from WorldData.GetAllActorsTrace returns two actors with following object archetypes:
if( TraceHitInfo.HitActor == FloorTileActor )
doesnt take into account if the actor is a ground plane.
FloorTileActor = WorldData.GetFloorTileActor(TempTile)
returns same XComLevelActor for both object archetypes,but only the first one is actually exactly the floor tile actor.
So it continues to the if-condition where it was not supposed to go,
and will fail the
XComFracLevelActor(TraceHitInfo.HitActor) == none
conditionThus prematurely ending the for loop and setting the KnockbackToLocation at the ground plane.
For a fix, I suggest adding another condition to check if the tile is a ground tile, as so:
Following picture before and after adding the new condition
The text was updated successfully, but these errors were encountered: