physics.GetBodies: return only non nil (active) bodies
This commit is contained in:
parent
17ce081452
commit
381d68b2a3
1 changed files with 1 additions and 1 deletions
|
@ -526,7 +526,7 @@ func Shatter(body *Body, position rl.Vector2, force float32) {
|
||||||
|
|
||||||
// GetBodies - Returns the slice of created physics bodies
|
// GetBodies - Returns the slice of created physics bodies
|
||||||
func GetBodies() []*Body {
|
func GetBodies() []*Body {
|
||||||
return bodies[:]
|
return bodies[:bodiesCount]
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetBodiesCount - Returns the current amount of created physics bodies
|
// GetBodiesCount - Returns the current amount of created physics bodies
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue