UDKOSC DEV: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 71: | Line 71: | ||
* OSCStartPawnBotOutput | * OSCStartPawnBotOutput | ||
* OSCStartBotOutput | * OSCStartBotOutput | ||
== Smooth Mouse example == | |||
// Smooth and amplify mouse movement | |||
SmoothTime = FMin(0.2, 3 * DeltaTime); | |||
MouseScale = MouseSensitivity * DesiredFOV * 0.0111; | |||
aMouseX = aMouseX * MouseScale; | |||
aMouseY = aMouseY * MouseScale; | |||
if ( (SmoothMouseX == 0) || (aMouseX == 0) | |||
|| ((SmoothMouseX > 0) != (aMouseX > 0)) ) | |||
SmoothMouseX = aMouseX; | |||
else if ( (SmoothMouseX <0.85 * aMouseX) || (SmoothMouseX> 1.17 * aMouseX) ) | |||
SmoothMouseX = 5 * SmoothTime * aMouseX + (1 - 5 * SmoothTime) * SmoothMouseX; | |||
else | |||
SmoothMouseX = SmoothTime * aMouseX + (1 - SmoothTime) * SmoothMouseX; | |||
if ( (SmoothMouseY == 0) || (aMouseY == 0) | |||
|| ((SmoothMouseY > 0) != (aMouseY > 0)) ) | |||
SmoothMouseY = aMouseY; | |||
else if ( (SmoothMouseY <0.85 * aMouseY) || (SmoothMouseY> 1.17 * aMouseY) ) | |||
SmoothMouseY = 5 * SmoothTime * aMouseY + (1 - 5 * SmoothTime) * SmoothMouseY; | |||
else | |||
SmoothMouseY = SmoothTime * aMouseY + (1 - SmoothTime) * SmoothMouseY; | |||
aMouseX = 0; | |||
aMouseY = 0; | |||
Revision as of 19:18, 20 April 2013
SetTimer
List of exec functions: http://udn.epicgames.com/Three/ExecFunctions.html
Echo::Canyon
PREPPING START OF PIECE
- HIDE ALL SCREEN OBJECTS: ToggleScreenShotMode
- InitPiece
SpawnOSCBot
- defaults to 0,0,2000
SpawnOSCBotAt(x,y,z)
- set parameters manually
MOVING OSCPAWNBOTS:
oscstartinput
ruby osccontrol.rb localhost 7001
osccheckpawnbots
oscpawnmove
playermove teleport 0 0 1000 0
OSCMove OSCSetFreeCamera OSCStartInput
SPACING OF FOLLOWERS
- take a local vector for targeting: LocalForward = vect(-30, -30, 0)
- transform that vecto: WorldForward = LocalForward >> Rotation
TO DO:
- Output downtrace over OSC
- Hide trace color lines
- Add tracing into startup script
- change size of OSCPawnBots by default (medium)
- change size of OSCPawn to larger
- make speed of OSCBot followers fluctuate
- Make "FollowOSCBots" a toggle and make it OSC toggled (even just via ConsoleCommand)
- teleport OSCBot
Make OSCBots track a target near the pawn, not itMake OSCBots use /bot osc output, not /pawn
TESTING :
OSCBot Following OSC controlled OSCPawnBot:
- SpawnPawnBot
- OSCCheckPawnBots
- OSCPawnMove
- OSCStartInput
- spawnoscbotat 50 50 500
- followoscbots
- OSCStartOutput
- OSCStartPawnBotOutput
- OSCStartBotOutput
Smooth Mouse example
// Smooth and amplify mouse movement
SmoothTime = FMin(0.2, 3 * DeltaTime); MouseScale = MouseSensitivity * DesiredFOV * 0.0111; aMouseX = aMouseX * MouseScale; aMouseY = aMouseY * MouseScale;
if ( (SmoothMouseX == 0) || (aMouseX == 0) || ((SmoothMouseX > 0) != (aMouseX > 0)) ) SmoothMouseX = aMouseX; else if ( (SmoothMouseX <0.85 * aMouseX) || (SmoothMouseX> 1.17 * aMouseX) ) SmoothMouseX = 5 * SmoothTime * aMouseX + (1 - 5 * SmoothTime) * SmoothMouseX; else SmoothMouseX = SmoothTime * aMouseX + (1 - SmoothTime) * SmoothMouseX;
if ( (SmoothMouseY == 0) || (aMouseY == 0) || ((SmoothMouseY > 0) != (aMouseY > 0)) ) SmoothMouseY = aMouseY; else if ( (SmoothMouseY <0.85 * aMouseY) || (SmoothMouseY> 1.17 * aMouseY) ) SmoothMouseY = 5 * SmoothTime * aMouseY + (1 - 5 * SmoothTime) * SmoothMouseY; else SmoothMouseY = SmoothTime * aMouseY + (1 - SmoothTime) * SmoothMouseY;
aMouseX = 0; aMouseY = 0;