some newbie questions about JoltPhysics #410
-
Hello,
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You could, but usually you would move (update) your character in your game code, so you can update the input then as well.
Please take a look at this thread: #239
That API doesn't exist. Usually the player behaves in a completely non-physical way, so I didn't bother creating it. I would create something simple but you can also take a look at that function (or 'Game Programming Gems 6' section 2.5 Exact Buoyancy for Polyhedra) for inspiration.
It depends on how your NPCs navigate. If they already know where they can walk by means of e.g. a navmesh you can get away with a Character (and one that only collides with dynamic objects because there's no point in colliding with static geometry if you already know where you can walk due to your navmesh). That class is a lot cheaper. If you need things like stair walking for your NPCs you're going to have to use the much more expensive CharacterVirtual.
See e.g. here: https://www.geeksforgeeks.org/air-resistance-formula/
The VehicleConstraint is made specifically for ground vehicles, I don't think it would make sense to create an air vehicle out of it (although you might use it for the landing gear). I would start by creating a regular Body and use AddForce/Impulse to control it, but I'm not an expert on air plane physics, you have to do some Googling yourself. |
Beta Was this translation helpful? Give feedback.
You could, but usually you would move (update) your character in your game code, so you can update the input then as well.
Please take a look at this thread: #239
That API doesn't exist. Usually the player behaves in a completely non-physical way, so I didn't bother …