www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Yatoom on September 03, 2014, 01:05:54 pm

Title: Moving textures in the Hello World example
Post by: Yatoom on September 03, 2014, 01:05:54 pm
Hi, it has been a while since I used jpct. Now, I forgot how to fix this problem that I had before in the Hello World (http://www.jpct.net/wiki/index.php/Hello_World) example. When I load in a texture and add it to a box, the texture starts rotating and stretching when the box rotates.

Texture:
(http://www.shamusyoung.com/twentysidedtale/images/pixelcity_windows2.jpg)

Output:
(https://i.imgflip.com/brgmv.gif)
Note: gif is at 6 fps.
Title: Re: Moving textures in the Hello World example
Post by: EgonOlsen on September 03, 2014, 02:43:18 pm
That's because the example uses environment mapping. Just set that to false or remove the line at it will stop. However, the box in this example has no proper texture coordinates, so the result won't look great anyway.