generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How would I determine when a projectile will begin to drop?

Previous Thread :: Next Thread 
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
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 is not online. 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
modularVoid is not online. modularVoid
Joined: 05 Dec 2015
Total Posts: 32
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
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
07 Dec 2015 07:04 PM
May I have an example?
Report Abuse
litalela is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
GooeyChopsticks is not online. GooeyChopsticks
Joined: 25 Nov 2015
Total Posts: 632
07 Dec 2015 08:38 PM
op skid
so i wont help
Report Abuse
cntkillme is not online. 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
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
08 Dec 2015 01:58 PM
lol gooey is acting like he actually knows how to do this

@nox Thanks!
Report Abuse
GooeyChopsticks is not online. GooeyChopsticks
Joined: 25 Nov 2015
Total Posts: 632
08 Dec 2015 03:31 PM
I actually do know how unlike you.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
08 Dec 2015 03:49 PM
I know when it will begin to drop: Immediately
Report Abuse
litalela is not online. 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
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
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
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
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 is not online. 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
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
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
GooeyChopsticks is not online. GooeyChopsticks
Joined: 25 Nov 2015
Total Posts: 632
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 is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
08 Dec 2015 05:49 PM


➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
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
GooeyChopsticks is not online. GooeyChopsticks
Joined: 25 Nov 2015
Total Posts: 632
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
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image