Beispiel #1
0
func (body *Body) setAngle(angle vect.Float) {
	body.a = angle
	body.rot = vect.FromAngle(angle)
}
Beispiel #2
0
func (this *Ship) ApplyThrust(thrust vect.Float) {
	thrustVector := vect.FromAngle(this.Body.Angle())
	thrustVector.Normalize()
	thrustVector.Mult(this.Prototype.Thrust * thrust)
	this.Body.AddForce(thrustVector.X, thrustVector.Y)
}