News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 17th Jul 2003, 02:24 AM   #1
Dark[NSF]
Northwest Secessionalist Forces
 
Dark[NSF]'s Avatar
 
Join Date: Mar. 12th, 2003
Location: Melbourne, Florida
Posts: 632
Exclamation Detecting Mouse Movement?

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.
__________________
http://www.ReignofMilitias.com

webevolved.com || ICQ: 96970935
Dark[NSF] is offline   Reply With Quote
Old 17th Jul 2003, 02:36 AM   #2
(v)adOnion
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
(v)adOnion is offline   Reply With Quote
Old 17th Jul 2003, 04:41 PM   #3
Dark[NSF]
Northwest Secessionalist Forces
 
Dark[NSF]'s Avatar
 
Join Date: Mar. 12th, 2003
Location: Melbourne, Florida
Posts: 632
Controlling a Pawn.
__________________
http://www.ReignofMilitias.com

webevolved.com || ICQ: 96970935
Dark[NSF] is offline   Reply With Quote
Old 17th Jul 2003, 04:51 PM   #4
Shrimp
Seafood splatter
 
Shrimp's Avatar
 
Join Date: Jan. 13th, 2003
Location: Deep in South Africa
Posts: 740
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...
Shrimp is offline   Reply With Quote
Old 17th Jul 2003, 06:01 PM   #5
Dark[NSF]
Northwest Secessionalist Forces
 
Dark[NSF]'s Avatar
 
Join Date: Mar. 12th, 2003
Location: Melbourne, Florida
Posts: 632
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?
__________________
http://www.ReignofMilitias.com

webevolved.com || ICQ: 96970935
Dark[NSF] is offline   Reply With Quote
Old 18th Jul 2003, 01:14 AM   #6
(v)adOnion
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
(v)adOnion is offline   Reply With Quote
Old 18th Jul 2003, 03:13 AM   #7
Dark[NSF]
Northwest Secessionalist Forces
 
Dark[NSF]'s Avatar
 
Join Date: Mar. 12th, 2003
Location: Melbourne, Florida
Posts: 632
That function can be placed in WeaponFire?
__________________
http://www.ReignofMilitias.com

webevolved.com || ICQ: 96970935
Dark[NSF] is offline   Reply With Quote
Old 18th Jul 2003, 03:34 AM   #8
(v)adOnion
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.
(v)adOnion is offline   Reply With Quote
Old 19th Jul 2003, 12:45 AM   #9
Dark[NSF]
Northwest Secessionalist Forces
 
Dark[NSF]'s Avatar
 
Join Date: Mar. 12th, 2003
Location: Melbourne, Florida
Posts: 632
lol, I can't put it anywhere; the compiler simply says

"Enexpected Function"

I've placed it 3 different places.. Strangely enough nothing changes...
__________________
http://www.ReignofMilitias.com

webevolved.com || ICQ: 96970935
Dark[NSF] 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 11:39 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