Doors and Holding Boxes
I've made a little progress with my game. Not much to say other than I have implimented picking up objects and simple door mechanics.
Here is just a simple door animation. It has open, opening, closed, closing, and reset open and closed animations. I'll add some user interaction code to deal with regular doors.
This is the object holding code. It is a bit complicated because of how it behaves. The object is not parented to the player. It calculates a distance for the cameras look direction and sets that as the target position. Then using the objects current position and target position I get a directional normal. With this normal I apply that to the objects velocity multiplied by it's weight and a movement speed. This way allows the object to interact with the world and react when it hits an object while you are moving. The next part is limiting it to specific object classes and adding general object interactions.
Posted in Coding, Game Development, Screenshots on Aug 08, 2018.