Hi,
I created simple movement system without physic.
- Frame by frame I calculate new position for my Cube (“New Location” Pin)
- Then I use Multi Box Trace By channel for checking any collisions.
- Then I check collision result. If no, then I call Set Actor location and use"New Location" data
- If there are collisions, then I check if all of them implements BI_IgnoreCollisionInterface.
- if at least one of them does not implement that interface, I set “Can move” on false and break loop.
- If “Can move” is true, that’s means all Hit Actors implements BI_Ignore_Collisions interface and then I call Set Actor Location
- I make all this steps for check vertical movement, forward movement and side movement.
- I cant use sweep variable, becouse this check only one hit results. I have to check all of them
- Box that Implements BI_Ignore_Collisions is simple box, simulate physics and gravity
- Draw Debug Type print new boxes in right place (I think so )
I think this is simple solution for checking if Cube can move or not, but sometimes cube stuck and can’t move. It’s looks like cube “penetrate” wall for few pixels. It’s really hard to debug and fix that. Maybe some of you see an error?