mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
update 'hitbox' property semantics
This commit is contained in:
parent
37f28a768c
commit
91230ecbeb
6 changed files with 7 additions and 6 deletions
|
|
@ -85,7 +85,7 @@ entityid_t Entities::spawn(
|
|||
const auto& tsf = registry.emplace<Transform>(
|
||||
entity, position, glm::vec3(1.0f), glm::mat3(1.0f), glm::mat4(1.0f), true);
|
||||
auto& body = registry.emplace<Rigidbody>(
|
||||
entity, true, Hitbox {def.bodyType, position, def.hitbox}, std::vector<Sensor>{});
|
||||
entity, true, Hitbox {def.bodyType, position, def.hitbox*0.5f}, std::vector<Sensor>{});
|
||||
|
||||
body.sensors.resize(def.radialSensors.size() + def.boxSensors.size());
|
||||
for (auto& [i, box] : def.boxSensors) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue