Search in sources :

Example 1 with ImpulseEvent

use of org.terasology.engine.physics.events.ImpulseEvent in project Terasology by MovingBlocks.

the class BlockEntitySystem method processDropping.

private void processDropping(EntityRef item, Vector3ic location, float impulsePower) {
    item.send(new DropItemEvent(new Vector3f(location)));
    item.send(new ImpulseEvent(random.nextVector3f(impulsePower, new Vector3f())));
}
Also used : DropItemEvent(org.terasology.engine.logic.inventory.events.DropItemEvent) Vector3f(org.joml.Vector3f) ImpulseEvent(org.terasology.engine.physics.events.ImpulseEvent)

Aggregations

Vector3f (org.joml.Vector3f)1 DropItemEvent (org.terasology.engine.logic.inventory.events.DropItemEvent)1 ImpulseEvent (org.terasology.engine.physics.events.ImpulseEvent)1