Body:setBullet

Body:setBullet

Set the bullet status of a body.

There are two methods to check for body collisions:

  • at their location when the world is updated (default)
  • using continuous collision detection (CCD)

The default method is efficient, but a body moving very quickly may sometimes jump over another body without producing a collision. A body that is set as a bullet will use CCD. This is less efficient, but is guaranteed not to jump when moving quickly.


Note that static bodies (with zero mass) always use CCD, so your walls will not let a fast moving body pass through even if it is not a bullet.

Function

Synopsis

Body:setBullet( status )

Arguments

boolean status
The bullet status of the body.

Returns

Nothing.

See Also


© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/Body:setBullet

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部