I'm new with Greenfoot.
I'm trying to make a pinball game for school. But now I got a problem.
To make the ball move more fluently I want to use a float to set the new Location.
But now I got stuck: When I use the following code I get an error: setLocation(int, int) in greenfoot.Actor can not be applied to (int, float).
I know I get this error because there's a float in the parameter of setLocation. I have to cast (is that the right word) the newY, so that the setLocation does accept it. But I forget how to do that.
Who can help me?
float newY = Math.round(yPosition + motionY); setLocation(xPosition,(float)(newY));