Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Being dragged
DamnNoHtml Offline
Senior Member

Posts: 469
Threads: 34
Joined: Sep 2010
Reputation: 16
#3
RE: Being dragged

You can easily do this with AddPlayerBodyForce.

Create a timer that has something like this:

void Drag (string &in asTimer)
{
     AddPlayerBodyForce(x,y,z,false);
     AddTimer("", 0.1, "Drag");
}

Change X Y and Z to how you want the character to be pushed. For example, if you want him to be dragged forward (along the Z axis, put something like)

void Drag (string &in asTimer)
{
     AddPlayerBodyForce(0,0,3000,false);
     AddTimer("", 0.1, "Drag");
}

When the player reaches the end area for the destination, just use the RemoveTimer() function.

Also, experiment with

MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist);

and

FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);

Creator of Wake, Through the Portal, Insomnia, and Cycles What to do with HPL3....
08-15-2011, 11:31 PM
Find


Messages In This Thread
Being dragged - by Elven - 08-15-2011, 10:04 PM
RE: Being dragged - by GreyFox - 08-15-2011, 11:20 PM
RE: Being dragged - by DamnNoHtml - 08-15-2011, 11:31 PM
RE: Being dragged - by Elven - 08-15-2011, 11:34 PM
RE: Being dragged - by Elven - 08-16-2011, 02:50 AM
RE: Being dragged - by DamnNoHtml - 08-16-2011, 04:39 AM



Users browsing this thread: 1 Guest(s)