Try something rotateX(1.2f) - this will surely work. The incompatible types isn't the 'wrong parameter' error i suggested - your error happens because earth.getRotation() can't be cast to float (or?).
Sorry, again. It appears that I do not know what I am saying, because I am not familiar with the method you are using and exactly what it does.
But I think it should work if you drop the 'earth =' part. However, you may have to put parenthesis around '(Actor3D)earth'
Ah, i see :D you cannot cast to Actor3D. Just remove the (Actor3D) and it will work, because earth.rotateX() returns the object (the Earth) again.
@GreenHouse, the cast doesnt matter, if i dont cast it, i get the same error. and why should the cast of a float to a float doesnt work`?
Edit: still doesnt work
@danpost, the paranthesis u suggested would destroy the reason i used the cast Actor3d here
earth = earth.rotateX(0.2f);
tell me if this line works for you; if yes then
earth = earth.rotateX(earth.getRotation());
will also work
Why does the 'rotateX' method return 'this' back to the calling method? The calling method must already have a reference to 'this' object just to call the method.
Yeah :D good question ;) the return is for something like this:
earth.rotateX(0.2f).rotateY(0.1f).rotateZ(0.3f);
Otherwise, you need to write
earth.rotateX(0.2f);
earth.rotateY(0.1f);
earth.rotateZ(0.3f);
which is the same, but a bit longer and not so cool to read :)
ur line
earth = earth.rotateX(0.2f);
doesnt work. idk why
same error
Yeah, earth.rotateX() returns an Actor3D, which cannot be cast to Earth. Remove the earth = .
Or put the whole expression in parenthesis with '(Earth)' in front.
But, since you are only using one method (not stringing them), removing 'earth =' would be the way to go.
Actually, you should never need 'earth ='; no matter what.