compelx
Member
6/8 | Multi-Object Collisions P2
Had some more time to think about the two problems I'm facing. To recap, they are:
- The first problem is if a player approaches an object from the sides it will displace them, in a jarring manner, either north of our south of the object. Preferably it should make the player stop altogether until they either strafe more to the left or right. This picture illustrates the path that if taken by the player should result in the player stopping until they correct their approach. I believe I'll just have to make some dead zone space which will instead halt the player and not displace them.
http://imgur.com/tgQlePH - The second problem is related to the player getting stuck between objects. This has been challenging to fix but I believe I'm close to a solution. The engine does have the ability to look ahead and see if the place the player is about to move would result in a collision but it cannot (without me coding it by hand) understand the difference between a collision with the rectangle perimeter of the sprite and a collision with the actual visible part of the wall. I've built a future collision checker which simulates what would happen if the player were to move forward and if that resulting X/Y pos would retrigger the collision that just happened (essentially, if the player moves here would that result in a never ending loop of collision with A, collision with B, collision with A, etc).
Here's a picture of one such place the player gets stuck
http://imgur.com/r04NNDg
6/7 | Multi-Object Collisions + VLOG #2
EDIT - Here's VLOG #2
https://youtu.be/hMZ1X6sZxSM
I've completed collision work for single TypeB objects (ones whos direction is ~156 degrees if start point is bottom right). When both TypeA and TypeB objects meet (an example would be where two different oriented walls connect) I observe two issues:
- Collision forces push the player away considerably stronger where the walls intersect
- The player can become stuck if collision forces are pushing north and south (or) east and west at the same time
I feel like I'm getting close on collisions though. Outside of these two observed effects walking around a variety of wall layouts and configurations has worked quite well.
6/4 | Depth and Collisions Redux (VLOG #1)
Here's a video demonstrating the depth and collision code. Turn on Subtitles/CC for some descriptions.
https://youtu.be/Ank2zmJNZ6w