Beispiel #1
0
// Gravity returns current gravity used when integrating velocity for rigid bodies.
func (s *Space) Gravity() Vect {
	return cpVect(C.cpSpaceGetGravity(s.c()))
}
Beispiel #2
0
// Get the gravity passed to rigid bodies when integrating velocity.
func (s *Space) GetGravity() (float64, float64) {
	vect := C.cpSpaceGetGravity(s.ptr)
	return float64(vect.x), float64(vect.y)
}