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
Making an entity fly
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#7
RE: Making an entity fly

(05-27-2011, 03:28 PM)Apjjm Wrote: The picture looks fine. Is that displacement on the x-axis really -54.25 units though - looks more like 4. Remember: place you want the player to be take away the place the player currently is. E.g:
Start X: 50 End X: 20 aFX: -30
Start Y: 00 End Y: 01 aFY: 01
Start Z: 00 End Z: 03 aFZ: 03


As long as you can reasonably be sure of no obstructions between the player and his goal, there shouldn't be an issue. Adjust the code to the following, though - otherwise you aren't using the multiplication and scaling your calculation appropriately.
void push_player_close_lock_door1(string &in asParent, string &in asChild, int alState)
{
    float mult = 1500.0f;
    AddPlayerBodyForce(mult * -54.25, 0, mult * -0.3, false);
        //OR Perhaps:
        //AddPlayerBodyForce(mult * 4, 0, 0, false);
}

Now he's being pushed forward...or...he's not even being pushed, he's running Tongue. Thanks btw but do you know the code so he gets pushed out of the room?.

EDIT!: Nvm I fixed it Big Grin. I changed "-54.25" to "54.25 ^^.

[Image: 44917299.jpg]Dubstep <3
(This post was last modified: 05-27-2011, 11:07 PM by xtron.)
05-27-2011, 11:04 PM
Find


Messages In This Thread
Making an entity fly - by xtron - 05-26-2011, 08:11 PM
RE: Making an entity fly - by Apjjm - 05-26-2011, 08:18 PM
RE: Making an entity fly - by xtron - 05-26-2011, 08:22 PM
RE: Making an entity fly - by Apjjm - 05-26-2011, 11:07 PM
RE: Making an entity fly - by xtron - 05-27-2011, 02:27 PM
RE: Making an entity fly - by Apjjm - 05-27-2011, 03:28 PM
RE: Making an entity fly - by xtron - 05-27-2011, 11:04 PM



Users browsing this thread: 1 Guest(s)