Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Rotating Polygons (https://forums.graalonline.com/forums/showthread.php?t=78989)

Tigairius 03-11-2008 02:21 AM

Rotating Polygons
 
PHP Code:

function onCreated() {
  
this.start = {00};
  
withfindimg(200) ) {
    
polygon = {this.start[0], this.start[1], this.start[0] + screenwidththis.start[1], this.start[0] + screenwidththis.start[1] + screenheightthis.start[0], this.start[1] + screenheight};
    
image "fog.png";
    
layer 4;
    
mode 1;
  }


Why aren't you able to rotate polygons? If I add "rotation=" in there it'll disappear. Any ideas?

Inverness 03-11-2008 02:25 AM

TShowImg.eulerrotation = {rotx, roty, rotz};

Never used it but try that.

DustyPorViva 03-11-2008 02:29 AM

Euler rotation doesn't work(I've tried and tried it).
It doesn't work because it calculate off of the center of the polygon... thus it's not disappearing, but rotating out of view.
In order to rotate it, you have to script the rotations into the polygon coordinates themselves.


All times are GMT +2. The time now is 06:29 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.