Results 1 to 14 of 14

Thread: Moving Forward

  1. #1
    Iron Guard
    Join Date
    Feb 2010
    Location
    Iran, Tehran
    Posts
    714

    Default Moving Forward

    hi every one.
    i need my pawn to move forward while he's playing attack animation. i'm using AddVelocity function like this:

    Code:
    AddVelocity(Normal(Vector(Rotation)) * WorldInfo.Game.GameSpeed * 100, Location, class'DamageType');
    but now i have problem with that. my character movement in ramps. i want him to move almost one step forward. but when he's standing on top of ramp, he flees down of the ramp quickly!

    how can i solve this?

    is there a function which i can use instead of AddVelocity?
    Last edited by donamin; 12-09-2010 at 08:08 AM.

  2. #2
    Redeemer
    Join Date
    Nov 2009
    Location
    Caracas
    Posts
    1,819
    Gamer IDs

    Gamertag: daimakupikoro PSN ID: lone_vampire

    Default

    look the playerController class and search state PlayerWalking and see

    Code:
    Pawn.Acceleration
    hope this help you.
    http://vincenzoravo.vrs.com.ve http://www.slaughtermaze.com

    please don't fill my inbox with questions, ask in the forum, the answers will help you and others !!!

  3. #3
    Iron Guard
    Join Date
    Feb 2010
    Location
    Iran, Tehran
    Posts
    714

    Default

    i'm using this code for pushing pawn forward:

    Code:
    local vector speed;
    local Rotator delta;
    speed = Normal(Vector(Rotation)) * WorldInfo.Game.GameSpeed * 100;
    speed.Z = 0;
    delta.Pitch = 0;
    delta.Roll = 0;
    delta.Yaw = 0;
    MyGameController(Controller).ProcessMove(WorldInfo.Game.TimeSinceLastTick, speed, DCLICK_None, delta);
    MyGameController(Controller).PlayerMove(WorldInfo.Game.TimeSinceLastTick);
    but it's not working.
    what's your idea?

  4. #4
    Redeemer
    Join Date
    Nov 2009
    Location
    Help-me!
    Posts
    1,267

    Default

    Quote Originally Posted by donamin View Post
    i'm using this code for pushing pawn forward:

    Code:
    local vector speed;
    local Rotator delta;
    speed = Normal(Vector(Rotation)) * WorldInfo.Game.GameSpeed * 100;
    speed.Z = 0;
    delta.Pitch = 0;
    delta.Roll = 0;
    delta.Yaw = 0;
    MyGameController(Controller).ProcessMove(WorldInfo.Game.TimeSinceLastTick, speed, DCLICK_None, delta);
    MyGameController(Controller).PlayerMove(WorldInfo.Game.TimeSinceLastTick);
    but it's not working.
    what's your idea?
    I have no idea what are you doing.

    Override ProcessMove instead of calling it, and change it to fit your desire.
    Lead Programmer
    It's the Only NEET Thing to Do

    Programming for non-fiction.
    I'm the function of my code. Conditions are my body and calls are my blood. I have input over a thousand lines. Unknown of bugs, nor known to work. Have withstand coffee to create many programs. Yet, those hands will never code anything again. So, as I pray, Unlimited Code Works.

  5. #5
    Iron Guard
    Join Date
    Feb 2010
    Location
    Iran, Tehran
    Posts
    714

    Default

    Quote Originally Posted by Saishy View Post
    I have no idea what are you doing.

    Override ProcessMove instead of calling it, and change it to fit your desire.
    are you sure i should override it? i just need my pawn to move forward a little while attacking. i don't want to change it's movement style.

    can you tell me what exactly processmove is used for?

  6. #6
    MSgt. Shooter Person
    Join Date
    Jul 2010
    Posts
    209

    Default

    you should have a look at the crouching functions that are built in as currently whilst crouched you cannot fall off a ledge.

  7. #7
    Veteran
    Join Date
    May 2007
    Location
    Above KillZ, Below StallZ
    Posts
    9,986

    Default

    If you didn't know what it was used for, why were you calling it?

    Crouching/Walking uses native functionality to prevent phys_walking from taking you off a ledge, as far as I know.

    Is there some reason why the various alternative methods aren't working? The ones we've suggested, such as Move(), MoveTo(), Root Motion, setting Acceleration or Velocity ...
    http://www.ericbla.de http://www.dungeondefenders.com http://en.wikipedia.org/wiki/Warm_Gun http://www.rekoil.com http://www.groundbranch.com

    - Please don't send me private messages asking programming questions, those would be better asked on the Programming forum here. Thanks

  8. #8
    Iron Guard
    Join Date
    Feb 2010
    Location
    Iran, Tehran
    Posts
    714

    Default

    i should finish this in one weeek and i have no idea what root motion is! so i have no time for working with root motion right now! setting velocity and acceleration has some problems in ramps. my character goes forward almost 10 steps instead of 1 in ramps! do you know any solution for that?

  9. #9
    Veteran
    Join Date
    May 2007
    Location
    Above KillZ, Below StallZ
    Posts
    9,986

    Default

    use smaller velocities ...
    http://www.ericbla.de http://www.dungeondefenders.com http://en.wikipedia.org/wiki/Warm_Gun http://www.rekoil.com http://www.groundbranch.com

    - Please don't send me private messages asking programming questions, those would be better asked on the Programming forum here. Thanks

  10. #10
    Iron Guard
    Join Date
    Feb 2010
    Location
    Iran, Tehran
    Posts
    714

    Default

    no i mean character moves the correct distance in smooth surfaces but when he goes on ramps, this distance changes!

  11. #11
    MSgt. Shooter Person
    Join Date
    Mar 2010
    Posts
    343

    Default

    Pointing the velocity you give to addVelocity() in a direction perpendecular to the base's normal vector wouldn't solve this?

  12. #12
    Iron Guard
    Join Date
    Feb 2010
    Location
    Iran, Tehran
    Posts
    714

    Default

    i didn't get that. could you explain more?

  13. #13
    MSgt. Shooter Person
    Join Date
    Mar 2010
    Posts
    343

    Default

    I mean:

    1. Do a normal trace downward and get the hit normal.
    2. Do a getAxes(Rotator(dir), X,Y,Z) on the direction you want the pawn to be pushed toward.
    3. pushVelocityDir = normal(hitNormal cross Y);
    4. addVelocity( pushVelocityMagnitude * pushVelocityDir );

    I don't know if that would solve your problem but this would give you a velocity parallel to the ramp and should have the same effect as on the ground.

    I hope it would help

  14. #14
    Iron Guard
    Join Date
    Feb 2010
    Location
    Iran, Tehran
    Posts
    714

    Default

    ok. i'll work on it. thanx a lot ali


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.