News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 5th Oct 2003, 04:26 PM   #1
Doc_EDo
LEFT
 
Join Date: Jan. 10th, 2002
Posts: 755
Question Spinny dude error

When i use this in my custom GUIpage
Code:
function bool InternalDraw(Canvas canvas)
{
	local vector CamPos, X, Y, Z;
	local rotator CamRot;

	if(bRenderDude)
	{
		canvas.GetCameraLocation(CamPos, CamRot);
		GetAxes(CamRot, X, Y, Z);

		SpinnyDude.SetLocation(CamPos + (SpinnyDudeOffset.X * X)
				 + (SpinnyDudeOffset.Y * Y) + (SpinnyDudeOffset.Z * Z));

		canvas.DrawActor(SpinnyDude, false, true, 90.0);
	}

	return false;
}
and that's epics code, I get double characters drawn?? Why?
Attached Thumbnails
Click image for larger version

Name:	spinndude.jpg
Views:	29
Size:	6.1 KB
ID:	67104  
__________________

Last edited by Wormbo; 5th Oct 2003 at 04:46 PM. Reason: linebreak in long line of code
Doc_EDo is offline   Reply With Quote
Old 5th Oct 2003, 05:17 PM   #2
EvilDrWong
Every line of code elevates you
 
EvilDrWong's Avatar
 
Join Date: Jun. 16th, 2001
Location: Inside the machine
Posts: 932
set it to bHidden if it isnt already. Unhide the first person view of a weapon and youll get the same effect.
__________________
How can you challenge a perfect immortal machine?
EvilDrWong is offline   Reply With Quote
Old 5th Oct 2003, 07:34 PM   #3
Doc_EDo
LEFT
 
Join Date: Jan. 10th, 2002
Posts: 755
Actually i've found the error.
It was the difference in the fov.
__________________
Doc_EDo is offline   Reply With Quote
Old 6th Oct 2003, 06:44 PM   #4
[SAS]Solid Snake
Registered User
 
[SAS]Solid Snake's Avatar
 
Join Date: Jun. 7th, 2002
Location: New Zealand
Posts: 2,633
I've also noticed this bug a lot, and I wasn't sure why. However when I only made sure that one SpinnyDude was being spawned it stopped happening. I didn't realise it had to do with the FOV
__________________
I make the impossible possible ... ... ... to some extent.

Digital Confectioners
[SAS]Solid Snake is offline   Reply With Quote
Old 6th Oct 2003, 06:51 PM   #5
Doc_EDo
LEFT
 
Join Date: Jan. 10th, 2002
Posts: 755
Well if you draw it like this
Code:
canvas.DrawActor(SpinnyDude, false, true, 90.0);
you specify the fov (90.0).
So if the current fov is 85 you'll see the double dude, since he's being drawn by the engine before the GUI is drawn.
Making sure same fov is used the other completely overlaps the first, so you dont see the first being drawn (you cant stop it from being drawn by the engine).
So just use this instead
Code:
canvas.DrawActor(SpinnyDude, false, true);
to solve the problem (you dont specify the fov, you let the engine figure it out).
__________________
Doc_EDo is offline   Reply With Quote
Old 6th Oct 2003, 06:58 PM   #6
[SAS]Solid Snake
Registered User
 
[SAS]Solid Snake's Avatar
 
Join Date: Jun. 7th, 2002
Location: New Zealand
Posts: 2,633
Yes but to draw SpinnyDude you must spawn it in the level too. I think I destroyed the one in the level...

Thanks for the knowledge though.
__________________
I make the impossible possible ... ... ... to some extent.

Digital Confectioners
[SAS]Solid Snake is offline   Reply With Quote
Old 7th Oct 2003, 05:51 AM   #7
Doc_EDo
LEFT
 
Join Date: Jan. 10th, 2002
Posts: 755
Of course, you must destroy it when exiting the menu.
__________________
Doc_EDo is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:49 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer