1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Spinny dude error

Discussion in 'Programming' started by Doc_EDo, Oct 5, 2003.

  1. Doc_EDo

    Doc_EDo LEFT

    Joined:
    Jan 10, 2002
    Messages:
    755
    Likes Received:
    0
    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? :eek:
     

    Attached Files:

    Last edited by a moderator: Oct 5, 2003
  2. EvilDrWong

    EvilDrWong Every line of code elevates you

    Joined:
    Jun 16, 2001
    Messages:
    932
    Likes Received:
    0
    set it to bHidden if it isnt already. Unhide the first person view of a weapon and youll get the same effect.
     
  3. Doc_EDo

    Doc_EDo LEFT

    Joined:
    Jan 10, 2002
    Messages:
    755
    Likes Received:
    0
    Actually i've found the error.
    It was the difference in the fov.
     
  4. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    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
     
  5. Doc_EDo

    Doc_EDo LEFT

    Joined:
    Jan 10, 2002
    Messages:
    755
    Likes Received:
    0
    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).
     
  6. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    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.
     
  7. Doc_EDo

    Doc_EDo LEFT

    Joined:
    Jan 10, 2002
    Messages:
    755
    Likes Received:
    0
    Of course, you must destroy it when exiting the menu.
     

Share This Page