Gravity constant moved into constants.rb, camera can now report what it is looking at, entity has knowledge of camera now, AABB tree search can now use either BoundingBox or Ray colliders

This commit is contained in:
2019-08-13 09:47:23 -05:00
parent 771b6a4247
commit 016e8109de
9 changed files with 57 additions and 33 deletions

View File

@@ -19,17 +19,18 @@ class IMICFPS
next unless node = @aabb_tree.objects[entity]
unless entity.bounding_box == node.bounding_box
@aabb_tree.update(entity, entity.bounding_box)
puts "Updating #{entity.class}"
@aabb_tree.update(entity, entity.bounding_box.clone)
end
end
check_broadphase
@physics_manager.update
end
collisions.each do |ent, list|
# puts "#{ent.class} -> [#{list.map { |e| e.class }.join(', ')}] (#{Gosu.milliseconds})"
end
def search(collider)
@aabb_tree.search(collider)
end
def remove(entity)