ZQFMGB12
|
  |
| Joined: 07 Aug 2010 |
| Total Posts: 208 |
|
|
| 21 Aug 2014 07:20 PM |
| In my game, I'm using BodyVelocity to make a player quickly drop (at the player's command). Initially, the drop was quite quick, but as I'm developing my game, I'm noticing that the player isn't dropping as quickly all of the time. Sometimes, the player drops quickly and other times, the player drops like a feather. The maxForce property is inf , P is 5000, and velocity is (0,-120,0). If the power/velocity is too much, the player will go through parts. Does anybody know how to fix this? |
|
|
| Report Abuse |
|
|
ZQFMGB12
|
  |
| Joined: 07 Aug 2010 |
| Total Posts: 208 |
|
| |
|
ZQFMGB12
|
  |
| Joined: 07 Aug 2010 |
| Total Posts: 208 |
|
|
| 21 Aug 2014 08:27 PM |
bump
I don't know if this is a lag problem or if I'm not using the right combination of P and velocity. |
|
|
| Report Abuse |
|
|
ZQFMGB12
|
  |
| Joined: 07 Aug 2010 |
| Total Posts: 208 |
|
| |
|
|
| 21 Aug 2014 08:36 PM |
| BodyVelocities seem to slow things down a little, unless the velocity is high enough. Try using a different body object? |
|
|
| Report Abuse |
|
|
ZQFMGB12
|
  |
| Joined: 07 Aug 2010 |
| Total Posts: 208 |
|
|
| 21 Aug 2014 08:41 PM |
It used to be fast (with less P actually), but I don't know what other body object would move you down at a constant speed. I'd prefer constant speed, but I could settle for BodyForce. So is this problem a Roblox/lag problem then? |
|
|
| Report Abuse |
|
|
ZQFMGB12
|
  |
| Joined: 07 Aug 2010 |
| Total Posts: 208 |
|
| |
|
|
| 21 Aug 2014 08:55 PM |
Try reading the wiki documentation for the instance. It will tell you what P does.
Google "Rbx.Lua.BodyVelocity" |
|
|
| Report Abuse |
|
|
ZQFMGB12
|
  |
| Joined: 07 Aug 2010 |
| Total Posts: 208 |
|
|
| 21 Aug 2014 08:57 PM |
| I know what P does. It's how much power is used to reach the goal velocity, I think. |
|
|
| Report Abuse |
|
|
ZQFMGB12
|
  |
| Joined: 07 Aug 2010 |
| Total Posts: 208 |
|
|
| 21 Aug 2014 09:00 PM |
| Wait, what do you mean by BodyVelocities slow things down a little? |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2014 09:02 PM |
Don't make the maxvelocity math.huge because the formula for bodyvelocity physics divides the maxvelocity, and math.huge/any number = math.huge. Just make it 0,9999999,0. |
|
|
| Report Abuse |
|
|
ZQFMGB12
|
  |
| Joined: 07 Aug 2010 |
| Total Posts: 208 |
|
|
| 21 Aug 2014 09:04 PM |
| I changed it to 1e+10, the problem still exists. |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2014 09:05 PM |
print( (1e+10)/(1e+10) )
--... |
|
|
| Report Abuse |
|
|
ZQFMGB12
|
  |
| Joined: 07 Aug 2010 |
| Total Posts: 208 |
|
|
| 21 Aug 2014 09:11 PM |
So is this problem a lag/Roblox problem?
When I first made that code, there weren't many parts/scripts in the game. As of now, I added at least 1000 more parts, and there are more scripts (some are CPU demanding such as enemy AI) |
|
|
| Report Abuse |
|
|
ZQFMGB12
|
  |
| Joined: 07 Aug 2010 |
| Total Posts: 208 |
|
| |
|
ZQFMGB12
|
  |
| Joined: 07 Aug 2010 |
| Total Posts: 208 |
|
| |
|
ZQFMGB12
|
  |
| Joined: 07 Aug 2010 |
| Total Posts: 208 |
|
|
| 21 Aug 2014 09:54 PM |
bump
I'm still really confused why sometimes, the player quickly drops and other times, the player drops like a feather. |
|
|
| Report Abuse |
|
|
ZQFMGB12
|
  |
| Joined: 07 Aug 2010 |
| Total Posts: 208 |
|
|
| 21 Aug 2014 10:05 PM |
UPDATE
I printed out the velocity of the player as it drops, and the velocity printed out is constant and the correct value (-120), but the apparent falling speed of the player is different (sometimes fast, sometimes very slow). |
|
|
| Report Abuse |
|
|
ZQFMGB12
|
  |
| Joined: 07 Aug 2010 |
| Total Posts: 208 |
|
| |
|