![]() |
|
|
#1 |
|
How do you do this?
Maybe somehow by using these? // - PlayerController Input float vars: aBaseX, aBaseY, aBaseZ, aMouseX, aMouseY, aForward, aTurn, aStrafe, aUp, aLookUp Thanks for the help. |
|
|
|
|
|
|
#2 |
|
chroot /
Join Date: Feb. 19th, 2002
Location: TH Aachen, Germany
Posts: 44
|
Where are you trying to detect mousemovement? In menus or while controlling a pawn?
__________________
Accelerate your computer - with 9.81 m/s² Projects: - TO: Crossfire - TacticalOps - TOST |
|
|
|
|
|
#3 |
|
Controlling a Pawn.
|
|
|
|
|
|
|
#4 |
|
I know aTurn tracks horizontal movement of the mouse, aTurn < 0 = turning left, aTurn > 0 = turning right.
Never needed vertical moust tracking, but I suspect it's either aUp or aLookUp... |
|
|
|
|
|
|
#5 |
|
if ((PlayerController(Instigator.Controller).aTurn < 0) || (PlayerController(Instigator.Controller).aTurn > 0))
{ ClientMessage("Stop moving fool!"); } When I move the mouse nothing happens, did I do something wrong? |
|
|
|
|
|
|
#6 |
|
chroot /
Join Date: Feb. 19th, 2002
Location: TH Aachen, Germany
Posts: 44
|
From the way you wrote it you are accessing it from another class. Iirc that never works because you are handling input flags and they are reset after usage (not 100% on this one tho)
Handling your check directly in function UpdateRotation(float DeltaTime, float maxPitch) will work however. And check for "if (aTurn != 0)"
__________________
Accelerate your computer - with 9.81 m/s² Projects: - TO: Crossfire - TacticalOps - TOST |
|
|
|
|
|
#7 |
|
That function can be placed in WeaponFire?
|
|
|
|
|
|
|
#8 |
|
chroot /
Join Date: Feb. 19th, 2002
Location: TH Aachen, Germany
Posts: 44
|
No .. it is contained in the Controllerclass. You could however overwrite the controllerclass and have UpdateRotation store the value in the corresponding pawn for example. WeaponFire could then access it ... however the next time updaterotation is called this movement value is gone again unless you add code to counter this (maybe with a timecheck to see if the pawn turned within the last second?)
The problem you are running into is updaterotation being called frequently. When it is called and you are not turning in the instant your are checking but instead the tick before your rotation check will give you a "no rotation in progress".
__________________
Accelerate your computer - with 9.81 m/s² Projects: - TO: Crossfire - TacticalOps - TOST Last edited by (v)adOnion; 18th Jul 2003 at 03:35 AM. |
|
|
|
|
|
#9 |
|
lol, I can't put it anywhere; the compiler simply says
"Enexpected Function" I've placed it 3 different places.. Strangely enough nothing changes... |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|