Mar 5, 2013 at 11:50 AM
Edited Mar 5, 2013 at 11:52 AM
Im trying to adjust the gravity based on the position of a little ball in the world so it will always roll back to the center.
But position of the sprite is always NaN.
I've tried this in Game_Timerloop:
Point pos = new Point(ballSprite.BodyObject.Position.X, ballSprite.BodyObject.Position.Y);
i get a reference to the object on game_loading like this:
ballSprite = this.GameContainer.PhysicsObjects["ballSprite"];