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: Help I need to know how long it takes to go

Previous Thread :: Next Thread 
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
14 Feb 2015 04:07 PM
I have this thing that rotates a set amount of degrees every 1/60 of a second.
The problem is I need to know how long it takes to rotate once

The degrees increase (every 1/60 of a second), is called rot

Can someone please help me?
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
14 Feb 2015 04:09 PM
local rot=0
print('It will approximately take about '..TIME..' To rotate once')
game:GetService('RunService').RenderStepped:connect(function()
rot=rot+1
end
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
14 Feb 2015 04:10 PM
SORRRY SORRY THE AMOUNT IT INCREASES IS CALLED INCREASE


local increase=1
local rot=0
print('It will approximately take about '..TIME..' To rotate once')
game:GetService('RunService').RenderStepped:connect(function()
rot=rot+increase=
end

Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
14 Feb 2015 04:19 PM
anyone?
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
14 Feb 2015 04:22 PM
In order to calculate this: you gotta have the increment of rotation, and the total rotation.

For instance, if I rotate a ball once every second, I couldn't tell you how long it would take without knowing when to stop rotating it and by how much to rotate it each second.
Report Abuse
Sinblade is not online. Sinblade
Joined: 14 Aug 2010
Total Posts: 2782
14 Feb 2015 04:22 PM

.016 or around that

hi
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
14 Feb 2015 04:24 PM
Okay so think of it like im spining a circle.



Every 1/60 of a second I move it (increase) degrees, and the max degrees is 360, so how long until it gets to 360
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
14 Feb 2015 04:25 PM
so then it's 360/60 * 1 or just simply 6 seconds
Report Abuse
Sinblade is not online. Sinblade
Joined: 14 Aug 2010
Total Posts: 2782
14 Feb 2015 04:26 PM

5.76 seconds

hi
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
14 Feb 2015 04:27 PM
I was looking for an equation, I kinda already figured that much out.

Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
14 Feb 2015 04:29 PM
Its like doing

if your going THIS distance per 1/60, and you want to 100 distance, how long will it take in seconds to go that far?
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
14 Feb 2015 04:32 PM
This it?

360/increase/60
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
14 Feb 2015 04:35 PM
if speed is distance over time, then time is distance * speed

so time = distance * degrees/60
I also think it has something to do with size

geez, these people are testing my math skills today.
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
14 Feb 2015 04:37 PM
I tested mine and what I was doing works the way it should and if you replace increase with 1 it makes 6 so it works.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
14 Feb 2015 04:40 PM
Simple.

Target/(IterationsPerSecond*StepsPerIteration)
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
14 Feb 2015 04:41 PM
Why does mine work yet his make sense?
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
14 Feb 2015 04:43 PM
Mine or hers? lol
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
14 Feb 2015 04:45 PM
both
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