I’m using Oimo.js for my FPS game, it’s a great engine for realistic collisions, but I’m lacking control in achieving certain artifical effects.
-
Is the best way to prevent the impostor from rotating when it collides (etc when it hits a sharp corner) to set the angular velocity to zero on every tick and use only linear velocity to move around instead of impulses?
-
How do I ensure that a physics imposter only starts falling if everything under it is empty? Right now, it falls when it’s center of mass is over the edge. This is realistic, but the impostor is clipping the edges of cliffs when it falls since I’m preventing it from rotating. I also just want players to be able to go all the way to the very edge.
-
How do I control movement on slopes? I assume that the rate at which my object slides has something to do with the angle of the slope, mass and friction, but how do I prevent players from sliding altogether and allow them to traverse it statically like on flat ground?
I don’t know if any of the current physics libraries address these issues or if there are shortcuts, or if I have to make my own engine altogether.