Problem in Static Sprite
by Pratik Murarka · in Torque Game Builder · 05/18/2008 (10:42 pm) · 3 replies
I am rendering the static image of which the resolution is 226 by 146(.png), the image is having some transparency.
The problem I am facing is like - I am getting a border white line on the image.
I am using proper scripting function to render like :
On the other hand, by using "setPosition" function(instead of "setLinearVelocity"for moving that object) I am not facing this sort of problem.
I am not getting how to resolve this problem
Thanks in advance,
The problem I am facing is like - I am getting a border white line on the image.
I am using proper scripting function to render like :
"%this.setImageMap(ImageMap);" // for rendering , "%this.setSize(226,146);" // for setting the size.I Getting white white line only when I give Linear Velocity to this image object.
On the other hand, by using "setPosition" function(instead of "setLinearVelocity"for moving that object) I am not facing this sort of problem.
I am not getting how to resolve this problem
Thanks in advance,
#2
some fundamental of tgb are really got cleared from your suggestion.
Lets remove some confusion ,
I am getting white line on the border of the image, I just given information where this white line is actually coming in the game.
I have checked the image properly the transparency of the image is perfect no here & there any mistake.
&
As far as VGA driver is concern, I am using this function (e.g setLinearVelocity & setPosition ) on any other image I am not facing this problem like white border around the Image.
Let me give more information like
TGB window resolution is set to 1024x768.
Width & height of the Camera view is 1024x768.
Just in case..
I am still not getting what would be the problem that, why the white bordered line is coming..........
Any ways Thanks in advance.........................
05/21/2008 (12:26 am)
It really helped me Ehrlicmann some fundamental of tgb are really got cleared from your suggestion.
Lets remove some confusion ,
I am getting white line on the border of the image, I just given information where this white line is actually coming in the game.
I have checked the image properly the transparency of the image is perfect no here & there any mistake.
&
As far as VGA driver is concern, I am using this function (e.g setLinearVelocity & setPosition ) on any other image I am not facing this problem like white border around the Image.
Let me give more information like
TGB window resolution is set to 1024x768.
Width & height of the Camera view is 1024x768.
Just in case..
I am still not getting what would be the problem that, why the white bordered line is coming..........
Any ways Thanks in advance.........................
#3
05/21/2008 (11:53 am)
Open up your image in the image builder (double click on the thumbnail of it in the create tab). Then check the filter pad box. That should get rid of the line.
Torque Owner Ehrlich
setSize doesnt work with pixels, but with world units, usually, a world unit in TGB its somethin like 8 pixels... so i think that settin an size of 226x146 in TGB its overkill... (really REALLY big image for the camera size that its on default).
now, you dont specify where the "white line" appears... i mean, does it appears in the very border or the image or where?... in my case, sometimes white lines appears in an object (specifically, animations) when the images where not well cut and sheeted in photoshop... but somtimes its a VGA rendering problem (it occurs on my machine, but not in others).
now, i see you have another confusion... or maybe i didnt really understant you.
setLinearVelocity will move the object at a given speed (in world units per second, as i understand) constantly... while setPosition will instantly move the object to a given position (again, in world units), so i think that if you're only facing this kinda problem when movin the sceneObject around, it might be a rendering problem, so you should check your VGA drivers or something.
hope it helps...