Hello everybody,
we're using Scaleform for drawing an in-game mouse cursor. However, as the framerate drops down, so does the movement of the mouse cursor. Is there any possibility of drawing a hardware cursor using the UDK?
This is what we've got:
hwhud_mouse.fla with a MovieClip called mouseCursor and the following ActionScript code:
An UnrealScript class that is set up by the HUD with the following code:
Changing the TimingMode didn't fix the issue... Any further ideas?
we're using Scaleform for drawing an in-game mouse cursor. However, as the framerate drops down, so does the movement of the mouse cursor. Is there any possibility of drawing a hardware cursor using the UDK?
This is what we've got:
hwhud_mouse.fla with a MovieClip called mouseCursor and the following ActionScript code:
Code:
Mouse.hide(); var mouseListener:Object = new Object(); mouseListener.onMouseMove = function () { mouseCursor._x = _root._xmouse; mouseCursor._y = _root._ymouse; }; Mouse.addListener(mouseListener);
Code:
// ============================================================================ // HWGFxHUD_Mouse // The movie clip providing a mouse cursor that is drawn on-top of the HUD. // // Related Flash content: UDKGame/Flash/HWHud/hwhud_mouse.fla // // Author: Nick Pruehs // Date: 2011/05/04 // // (C) 2011 2nd Reality Studios. All Rights Reserved. // ============================================================================ class HWGFxHUD_Mouse extends GFxMoviePlayer; /** The mouse cursor of the HUD. */ var GFxObject MouseCursor; function bool Start(optional bool StartPaused = false) { local bool bLoadErrors; bLoadErrors = super.Start(StartPaused); // initialize this movie clip without actually advancing the movie Advance(0.f); // don't scale mouse cursor SetViewScaleMode(SM_NoScale); // ensure mouse cursor is always on top MouseCursor = GetVariableObject("mouseCursor"); MouseCursor.SetBool("topmostLevel", true); `log("ยงยงยง GUI: "$self$" has been started."); return bLoadErrors; // (b && true = b) } DefaultProperties { MovieInfo=SwfMovie'UI_HWHud.hwhud_mouse' bDisplayWithHudOff=false TimingMode=TM_Real bPauseGameWhileActive=false bIgnoreMouseInput=false }
Comment