|
| 07 Dec 2015 07:00 PM |
| This is for all the mathy people. How would I incorporate this into a roblox object being thrusted? |
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 07 Dec 2015 07:03 PM |
math
you could use negative exponential growth ( i recommend this, its ez )
or use a quadratic function or go wild and do a continuous growth function to find the drop
then just use like points and stuff and math
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 07:04 PM |
s=-16t^2+v*t+k
t = time
v = initial velocity of the ball
k = height from 0 |
|
|
| Report Abuse |
|
|
| |
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 07 Dec 2015 07:05 PM |
modular thats ewww
i mean thats what it should be but negative exponential growth achieves a very similar result so its fine
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 07 Dec 2015 07:09 PM |
hm i forget that this is in 3d
well in 2d itd be different, i havent taken precal or AFM yet so im not sure in 3d land
oh scratch that, you could have something like y = -a(1.01)^x + k
a being mass of the object, y shifting it up
then you could get a point using x (in this case you would do distance from the origin for x) then you would use that y coordinate to affect your bullet
if that makes sense
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 07 Dec 2015 08:13 PM |
"How would I determine when a projectile will begin to drop?" What's the given velocity? No forces except gravity?
In theory it would be as simple as: t = -vyi/-196.2 Where t is time, -vyi is -initial y velocity.
ay = dvy/t t = dvy/ay t = -vyi/-196.2
|
|
|
| Report Abuse |
|
|
nox7
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 27467 |
|
|
| 07 Dec 2015 08:21 PM |
The problem with all of these solutions is the fact that none of them incorporate the fact that we don't always launch a projectile with enough knowns to use kinematic physics.
Here is a purely procedural method of doing it that works wondrously.
local function WaitUntilProjectileIsDropping(Part, MarginOfError) local MarginOfError = MarginOfError or 2 local StartWaitTime = tick() while (Part.Velocity.Y > (0 + MarginOfError)) do wait() end return tick() - StartWaitTime end
local PartToWatch = workspace.TestPart local TimePassed = WaitUntilProjectileIsDropping(PartToWatch) print(("Projectile started dropping %s after waiting for it to drop."):format(TimePassed))
--
Started a part with Velocity at < 100, 100, 0 > Got "Projectile started dropping 0.56969594955444 after waiting for it to drop." |
|
|
| Report Abuse |
|
|
nox7
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 27467 |
|
|
| 07 Dec 2015 08:23 PM |
| We can actually compute the margin of error from that too. I started the part at +100 velocity, and ROBLOX's gravity is -196.2. This is almost double the starting velocity. For it to get to 0, it should take close to 0.5 seconds at that rate. We got close! |
|
|
| Report Abuse |
|
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 07 Dec 2015 08:38 PM |
| He can't necessarily predict when it'll drop, unless it doesn't matter for him.` |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 01:58 PM |
lol gooey is acting like he actually knows how to do this
@nox Thanks! |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 03:31 PM |
| I actually do know how unlike you. |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 03:49 PM |
| I know when it will begin to drop: Immediately |
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 08 Dec 2015 03:49 PM |
exactly
bullets dont just decide to drop out of nowhere
gravity is constant
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 05:23 PM |
| @gooey I know you're liying. You are not nearly good at math. And now, I do know how. |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 05:25 PM |
@gooey You don't know anything about this. However, I do now.
If you're so good at math show me how you'd incorporate polynomials into RBX.lua |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 08 Dec 2015 05:32 PM |
| By dropping I assumed when the vertical velocity becomes negative. |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 05:33 PM |
"k = height from 0" K would have no use here, as it would be the time it takes to reach 0, not start falling. |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 05:47 PM |
Fishguy, you haven't even seen my math recently. On top of that, I have nothing to prove to you. Your a pessimistic brat with mental issues who uses others so called 'faults' (which really aren't, you suck worse than them) to further your own egotistical behavior.
Your IQ and mental capacity: 0 |
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 08 Dec 2015 05:49 PM |
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 05:53 PM |
Fishguy, you haven't even seen my math recently. On top of that, I have nothing to prove to you. Your a pessimistic brat with mental issues who uses others so called 'faults' (which really aren't, you suck worse than them) to further your own egotistical behavior.
Your IQ and mental capacity: 0
Well atleast I have a higher intelligence quotient. Also, you are a real moron... |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 06:12 PM |
Yea, totally. That's why you spend your time stalking my post, buddy :)
#code function iAmCool()return "Yes, Gooey is cool.";end print(iAmCool()) |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 06:20 PM |
| Look who broke his promise not to answer to me. And I answer your posts in hopes of putting some knowledge into you of when to post in OT and not scripters. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 08 Dec 2015 06:21 PM |
| Why don't you both shut up and go to OT? |
|
|
| Report Abuse |
|
|