|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT> cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule<UT2004Bot> cz.cuni.amis.pogamut.ut2004.bot.command.BotCommands cz.cuni.amis.pogamut.ut2004.bot.command.SimpleLocomotion cz.cuni.amis.pogamut.ut2004.bot.command.AdvancedLocomotion
public class AdvancedLocomotion
Class providing Pogamut2 UT2004 advanced locomotion commands for the bot - strafing, advanced turning, dodging...
Field Summary |
---|
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule |
---|
act, worldView |
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
---|
agent, controller, eventBus, log |
Constructor Summary | |
---|---|
AdvancedLocomotion(UT2004Bot agent,
java.util.logging.Logger log)
Constructor. |
Method Summary | |
---|---|
void |
dodge(Vector3d direction)
Makes the bot to dodge in the selected direction (this is in fact single jump that is executed to selected direction). |
void |
dodgeBack(ILocated botPosition,
ILocated inFrontOfTheBot)
Dodges to the back... |
void |
dodgeBack(ILocated botPosition,
ILocated inFrontOfTheBot,
double z)
Dodges to the back... |
void |
dodgeLeft(ILocated botPosition,
ILocated inFrontOfTheBot)
Dodges to the left... |
void |
dodgeLeft(ILocated botPosition,
ILocated inFrontOfTheBot,
double z)
Dodges to the left... |
void |
dodgeRight(ILocated botPosition,
ILocated inFrontOfTheBot)
Dodges to the right... |
void |
dodgeRight(ILocated botPosition,
ILocated inFrontOfTheBot,
double z)
Dodges to the right... |
void |
doubleJump()
Makes the bot to double jump instantly (issues GB JUMP command) with default settings. |
void |
doubleJump(double secondJumpDelay,
double jumpZ)
Makes the bot to double jump instantly (issues GB JUMP command) with custom settings. |
void |
generalJump(boolean doubleJump,
double secondJumpDelay,
double jumpZ)
Makes the bot to jump instantly (issues GB JUMP command) with custom settings. |
void |
jump()
Bot will make simple jump (Issues GB JUMP command) |
void |
jump(boolean doubleJump,
double secondJumpDelay,
double jumpZ)
Makes the bot to jump (or double jump) instantly (issues GB JUMP command) with custom settings. |
void |
jump(double jumpZ)
Makes the bot to jump instantly (issues GB JUMP command) with custom settings. |
void |
moveAlong(ILocated firstLocation,
ILocated secondLocation)
Makes the bot to move through first location to second location (may be specified directly or some ILocated object may be supplied - carefull with objects traversability). |
void |
moveContinuos()
This makes the bot to run straight ahead continuously. |
void |
moveTo(ILocated location)
Bot will move to supplied location. |
void |
setRotationSpeed(Rotation newRotationRate)
Sets the rotation speed (rotation rate) for the bot. |
void |
setRun()
Sets the running speed for the bot movement commands. |
void |
setSpeed(double speedMultiplier)
Sets the speed multiplier for the bot. |
void |
setWalk()
Sets the walking speed for the bot movement commands. |
void |
stopMovement()
Makes the bot to stop all movement or turning. |
void |
strafeLeft(double distance)
Bot strafes left. |
void |
strafeLeft(double distance,
ILocated focusLocation)
Bot strafes left. |
void |
strafeLeft(double distance,
UnrealId focusId)
Bot strafes left. |
void |
strafeRight(double distance)
Bot strafes right. |
void |
strafeRight(double distance,
ILocated focusLocation)
Bot strafes right. |
void |
strafeRight(double distance,
UnrealId focusId)
Bot strafes right. |
void |
strafeTo(ILocated location,
ILocated focusLocation)
Makes the bot to move to location while looking at focusLocation. |
void |
strafeTo(ILocated location,
UnrealId focus)
Makes the bot to move at location, while looking at focus object. |
void |
turnHorizontal(int amount)
Rotates the bot by the supported amount (in degrees) in left/right direction (issues GB ROTATE command) |
void |
turnTo(ILocated location)
Bot will turn to face supported location (issues GB TURNTO command) |
void |
turnTo(Item item)
Bot will turn to face 'item' (isseus GB TURNTO command), the bot will face the item even if it or the item moves. |
void |
turnTo(Player player)
Bot will turn to face 'player' (isseus GB TURNTO command), the bot will face the player even if it or the player moves. |
void |
turnVertical(int amount)
Rotates the bot by the supported amount (in degrees) in up/down direction (issues GB ROTATE command) |
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
---|
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AdvancedLocomotion(UT2004Bot agent, java.util.logging.Logger log)
agent
- AbstractUT2004Bot we will send commands forlog
- Logger to be used for logging runtime/debug info.Method Detail |
---|
public void moveAlong(ILocated firstLocation, ILocated secondLocation)
firstLocation
- First location we will go through.secondLocation
- Second location we will go to (after reaching first).moveContinuous()
public void moveContinuos()
moveAlong(ILocated, ILocated)
public void strafeRight(double distance, UnrealId focusId)
distance
- - how far the bot strafes (in UT units, 1 UT unit equals
roughly 1 cm).focusId
- - UnrealId of the object that should be the bot focus.strafeLeft(double,ILocated)
public void strafeRight(double distance, ILocated focusLocation)
distance
- - how far the bot strafes (in UT units, 1 UT unit equals
roughly 1 cm).focusLocation
- - location where the bot should lookstrafeLeft(double,ILocated)
public void strafeRight(double distance)
distance
- - how far the bot strafes (in UT units, 1 UT unit equals
roughly 1 cm).strafeLeft(double)
public void strafeLeft(double distance, UnrealId focusId)
distance
- - how far the bot strafes (in UT units, 1 UT unit equals
roughly 1 cm).focusId
- - UnrealId of the object that should be the bot focus.strafeRight(double,ILocated)
public void strafeLeft(double distance, ILocated focusLocation)
distance
- - how far the bot strafes (in UT units, 1 UT unit equals
roughly 1 cm).focusLocation
- - location where the bot should lookstrafeRight(double,ILocated)
public void strafeLeft(double distance)
distance
- - how far the bot strafes (in UT units, 1 UT unit equals
roughly 1 cm).strafeRight(double)
public void strafeTo(ILocated location, ILocated focusLocation)
location
- Location we will strafe to.focusLocation
- Location we will look at while strafing.strafeTo(ILocated, UnrealId)
public void strafeTo(ILocated location, UnrealId focus)
location
- Location we will strafe to.focus
- Object with UrealId. We will look at this location while
strafing. We will update our focus location according to the
current position of this obejct in UT.strafeTo(ILocated, ILocated)
public void doubleJump()
jump()
,
dodge(Vector3d)
public void generalJump(boolean doubleJump, double secondJumpDelay, double jumpZ)
See also SimpleLocomotion.jump()
.
doubleJump
- whether the bot should double jumpsecondJumpDelay
- If doubleJump, than after time specified here, the bot performs second jump of a double jump (if DoubleJump is true). Time is in seconds. GB2004 default is 0.5s.jumpZ
- than this is a force vector specifying how big the jump should be. Can't be set more than 2 * JumpZ = 680 for double jump.jump()
,
dodge(Vector3d)
public void doubleJump(double secondJumpDelay, double jumpZ)
See also SimpleLocomotion.jump()
.
secondJumpDelay
- After time specified here, the bot performs second jump of a double jump (if DoubleJump is true). Time is in seconds. GB2004 default is 0.5s.jumpZ
- Force vector specifying how big the jump should be. Can't be set more than 2 * JumpZ = 680 for double jump.jump()
,
dodge(Vector3d)
public void dodge(Vector3d direction)
direction
- Vector (that will be normalized) that specifies direction of
the jump.jump()
,
doubleJump()
public void dodgeRight(ILocated botPosition, ILocated inFrontOfTheBot)
botPosition
- current bot positioninFrontOfTheBot
- usually the enemy of the botpublic void dodgeRight(ILocated botPosition, ILocated inFrontOfTheBot, double z)
botPosition
- current bot positioninFrontOfTheBot
- usually the enemy of the botz
- allows you to dodge to the air, usual const is 50-100public void dodgeLeft(ILocated botPosition, ILocated inFrontOfTheBot)
botPosition
- current bot positioninFrontOfTheBot
- usually the enemy of the botpublic void dodgeLeft(ILocated botPosition, ILocated inFrontOfTheBot, double z)
botPosition
- current bot positioninFrontOfTheBot
- usually the enemy of the botz
- allows you to dodge to the air, usual const is 50-100public void dodgeBack(ILocated botPosition, ILocated inFrontOfTheBot)
botPosition
- current bot positioninFrontOfTheBot
- usually the enemy of the botpublic void dodgeBack(ILocated botPosition, ILocated inFrontOfTheBot, double z)
botPosition
- current bot positioninFrontOfTheBot
- usually the enemy of the botz
- allows you to dodge to the air, usual const is 50-100public void setSpeed(double speedMultiplier)
speedMultiplier
- Ranges from 0.1 to 2 (max may be set in ini in [RemoteBot]
MaxSpeed)setRotationSpeed(Rotation)
public void setRotationSpeed(Rotation newRotationRate)
newRotationRate
- Default is Pitch=3072, Yaw=60000, Roll=2048. To achieve best
results we suggest to multiply the default setting.setSpeed(double)
public void jump()
SimpleLocomotion
jump
in class SimpleLocomotion
public void jump(double jumpZ)
See also SimpleLocomotion.jump()
.
jumpZ
- Force vector specifying how big the jump should be. Can't be set more than JumpZ = 340 for single jump.jump()
,
dodge(Vector3d)
public void jump(boolean doubleJump, double secondJumpDelay, double jumpZ)
See also SimpleLocomotion.jump()
.
doubleJump
- whether to perform double jumpsecondJumpDelay
- After time specified here, the bot performs second jump of a double jump (if DoubleJump is true). Time is in seconds. GB2004 default is 0.5s.jumpZ
- Force vector specifying how big the jump should be. Can't be set more than 2 * JumpZ = 680 for double jump.jump()
,
dodge(Vector3d)
public void moveTo(ILocated location)
SimpleLocomotion
moveTo
in class SimpleLocomotion
SimpleLocomotion.stopMovement()
public void setRun()
SimpleLocomotion
setRun
in class SimpleLocomotion
SimpleLocomotion.setWalk()
public void setWalk()
SimpleLocomotion
setWalk
in class SimpleLocomotion
SimpleLocomotion.setRun()
public void stopMovement()
SimpleLocomotion
stopMovement
in class SimpleLocomotion
SimpleLocomotion.moveTo(ILocated)
public void turnHorizontal(int amount)
SimpleLocomotion
turnHorizontal
in class SimpleLocomotion
amount
- Amount of rotation in degrees.SimpleLocomotion.turnVertical(int)
,
SimpleLocomotion.turnTo(ILocated)
public void turnTo(ILocated location)
SimpleLocomotion
turnTo
in class SimpleLocomotion
location
- Location we will face.SimpleLocomotion.turnHorizontal(int)
,
SimpleLocomotion.turnVertical(int)
public void turnTo(Player player)
SimpleLocomotion
turnTo
in class SimpleLocomotion
player
- Player we will face.public void turnTo(Item item)
SimpleLocomotion
turnTo
in class SimpleLocomotion
item
- Item we will face.public void turnVertical(int amount)
SimpleLocomotion
turnVertical
in class SimpleLocomotion
amount
- Amount of rotation in degrees.SimpleLocomotion.turnHorizontal(int)
,
SimpleLocomotion.turnTo(ILocated)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |