FPS Gravity/Collision
-
i'm wanting to learn how to implement gravity and(or) collision for an FPS scene. i intend the player to jump, walk up stairs, and the ability fall from high places.
-
@Darien112 Nice! How far are you with the project so far?
-
@Darien112 Unfortunately Fuze doesn't have a built in physics engine (yet) so you are going to have to model it yourself.
Have a look at this post here: https://www.quora.com/How-do-video-game-creators-program-gravity-and-other-physics-concepts
-
@Tratax it terms of making proper collision not much yet I'm trying to think of a way it can be achieved meeting all three requirements I stated above
@pianofire agreed that would help out much. thank you for the resource, I'll keep at it and see what I can come up with. -
@Darien112 Awesome, here's a link that helped me a lot .. This was something i spent a lot of time thinking about! Found that the concept gets easier once you practice making small projects
I think of it this way:
- Gravity is just an object moving in a particular direction, this is just a representation of 2 or 3 variable values (x,y) or (x,y,z)
- Collision is just a testable "state" to check the distance or between two different objects variable value
- Something needs to influence this (bool, function, etc).. Something that either increases, decreases, stops or starts the intended variable representing movement for the player, platform, object, etc
If you haven't done collision detection before, I'd recommend making a small 2D platformer as a start.. I've been meaning to make one so i'll code one up shortly