1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-23 20:02:32 +08:00

added mesh initial velocity

This commit is contained in:
1AlbertChen 2021-11-27 15:05:20 +08:00
parent d0a5621d5d
commit 050df4073c

View File

@ -116,7 +116,7 @@ export default function useCannon(options) {
mesh.userData.velocity.y,
mesh.userData.velocity.z) : new Vec3(0, 0, 0)
const body = new Body({ shape, position, quaternion, velocity, mass, linearDamping: damping, angularDamping: damping })
const body = new Body({ shape, position, velocity, quaternion, mass, linearDamping: damping, angularDamping: damping })
world.addBody(body)
mesh.userData.body = body