Skip to content

Commit

Permalink
feat(joml): changes from bullet physics conversion (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
pollend authored Nov 10, 2020
1 parent 97a636b commit ff92fa3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.terasology.logic.inventory.ItemComponent;
import org.terasology.logic.inventory.events.DropItemEvent;
import org.terasology.logic.location.LocationComponent;
import org.terasology.math.JomlUtil;
import org.terasology.math.TeraMath;
import org.terasology.math.geom.Vector2i;
import org.terasology.math.geom.Vector3f;
Expand Down Expand Up @@ -257,7 +258,7 @@ private boolean shouldDropToWorld(DoDestroyEvent event, BlockDamageModifierCompo
private void createDrop(EntityRef item, Vector3f location, boolean applyMovement) {
item.send(new DropItemEvent(location));
if (applyMovement) {
item.send(new ImpulseEvent(random.nextVector3f(30.0f, new org.joml.Vector3f())));
item.send(new ImpulseEvent(JomlUtil.from(random.nextVector3f(30.0f))));
}
}
}

0 comments on commit ff92fa3

Please sign in to comment.