mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
update Entities::preparePhysics - ticks are delta-based now
This commit is contained in:
parent
eedce588b1
commit
e008832ebb
2 changed files with 54 additions and 41 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include "../typedefs.hpp"
|
||||
#include "../physics/Hitbox.hpp"
|
||||
#include "../data/dynamic.hpp"
|
||||
#include "../util/Clock.hpp"
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
|
@ -161,8 +162,12 @@ class Entities {
|
|||
std::unordered_map<entityid_t, entt::entity> entities;
|
||||
std::unordered_map<entt::entity, entityid_t> uids;
|
||||
entityid_t nextID = 1;
|
||||
util::Clock sensorsTickClock;
|
||||
|
||||
void preparePhysics();
|
||||
void updateSensors(
|
||||
Rigidbody& body, const Transform& tsf, std::vector<Sensor*>& sensors
|
||||
);
|
||||
void preparePhysics(float delta);
|
||||
public:
|
||||
struct RaycastResult {
|
||||
entityid_t entity;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue