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 » Scripting Helpers
Home Search
 

Re: Football Physics Help

Previous Thread :: Next Thread 
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
10 Nov 2012 02:54 AM
OK, first of all, the ball doesn't move very well when kicked.

It sort of jitters, and it just looks horrible.

Secondly, in my game, walk into the ball to dribble (adds velocity). It's terrible too. Sometimes the player will try to climb on the ball, and then the ball will go somewhere you don't want it to go, and you'll end up jumping really high and hitting the ceiling.

Is there any way to fix this? The place is RoBall (my 3rd).
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
10 Nov 2012 03:02 AM
Which velocity object should I use to simulate kicks? Should I just set the ball's velocity instead of adding an object?
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
10 Nov 2012 04:12 PM
Use a BodyForce to lower player's 'gravity'. As for ball, try setting the Friction to 0?
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
11 Nov 2012 01:05 AM
But...wouldn't lowering there gravity make them even more prone to flying around and crawling on top of the ball?

As for the friction, I'll try that.
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
11 Nov 2012 01:23 AM
SN0X I know what is wrong but I'd have to show you, can't exactly tell you in this forum or it wouldn't make sense.
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
11 Nov 2012 03:14 AM
If you really don't want to have a dribble tool you could just have it add the dribble velocity whenever they touch it with their feet. Because you kinda have to spam-click with the system as it is now :P
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
11 Nov 2012 03:39 AM
Yeah, that's how it is now.

Yesterday, it was broken. I tried to do something like if name:sub(name:len()-3, name:len()) == "Leg", but that failed.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
11 Nov 2012 04:00 AM
Just do name:sub(-3)=="Leg".
XD
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
11 Nov 2012 05:03 AM
You can do that?

Wow, thanks.
Report Abuse
RA2lover is not online. RA2lover
Joined: 09 Nov 2008
Total Posts: 1254
11 Nov 2012 06:05 AM
make the ball have a significant aumount of drag. you won't be really able to control it if it doesn't happen.
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
11 Nov 2012 07:40 AM
^

Yeah, so you can catch up with it. I can do that by simply placing a bodyvelocity with the target of 0, 0, 0 and max force of n, 0, n.

But the bigger problem is that when you dribble, you climb onto the ball...arghhh! Is there any way to disable player climbing? Humanoid.CanClimb would be great :D
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
11 Nov 2012 08:10 AM
Extremely high gravity?
Report Abuse
RA2lover is not online. RA2lover
Joined: 09 Nov 2008
Total Posts: 1254
11 Nov 2012 08:22 AM
just constrain his movement with bodyposition
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
11 Nov 2012 08:50 AM
Then he won't be able to jump...

I'm interested in TPS's solution. I'm trying to find an uncopylocked pirated version :D Or something like that...
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
11 Nov 2012 09:24 AM
http://www.roblox.com/catalog/browse.aspx?Keyword=dribble%20tool&SortType=0&SortAggregation=3&SortCurrency=0&LegendExpanded=true&Category=6
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
11 Nov 2012 09:50 AM
There is no way to lower or raise gravity, that I know of (Let me know if there is).

To completely counter-act gravity, one multiplys some constant by a model's mass, but if u get it wrong by even the smallest amount, things just fly up, or sink like a stone.

Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
11 Nov 2012 09:54 AM
For physics, I've seen socore games with a kick button, which animates the limb to kick; hack those, or yeah, when Player get close to ball ( Strip the y value from that comparison), then take Plaer's Velocity; multiply it by something, and stuff it in ball.
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
11 Nov 2012 10:13 AM
Gravity:

g = 1
part = blahrgh
force = Instance.new("BodyForce")
force.force = Vector3.new(0, 128.6*g, 0)
force.Parent = part


...or something like that. I don't know if force is a real property, or if the exact gravity is 128.6...but it's somewhere around 128.2-128.8
Report Abuse
RA2lover is not online. RA2lover
Joined: 09 Nov 2008
Total Posts: 1254
11 Nov 2012 10:54 AM
the 0g constant is 9.81*20 - or 196.2 studs/s².

with 3 studs being 1 meter(CM32's pseudoscale(his planes don't follow it)) - the force would need to be 130.8*mass.
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
13 Nov 2012 10:11 AM
bump.

In simple words, what I'm looking for is a way to stop a character climbing on top of a 2x2x2 ball and flying everywhere.
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
13 Nov 2012 11:30 AM
Listen Snox,

The physics are what they are. Footballs will always apear to move too fast. Because we are only "6 tall, or something like that. Balls will apear to bounce up & down too quickly, because they r the size of a small ball-bearing.

So you can't stop the physics from making u climb a ball, but there are 101 ways to skin a cat.

This guy gave u a Dribble script. Did you test it? Does it work? Do any of the 500 other Dribble scripts in the catalog work?

http://www.roblox.com/catalog/browse.aspx?Keyword=dribble%20tool&SortType=0&SortAggregation=3&SortCurrency=0&LegendExpanded=true&Category=6

Some do work. Some do almost exactly what u want to do, but not quite: THAT is the point that u came to Scripters.

But u must do some of the work: Nobody likes testing, but someone has to do it.

Look at it as the contribution which u r giving to us: We get a nice chunk of tested code to use. You get a script customized to your liking. But u have to do the work.

Go find something that works; bring back for customization,
Brian


Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
13 Nov 2012 11:36 AM
^

And LOL of the day goes too........bjcarpenter!

1. So I'm not trying, or helping, or testing? I've spent hours doing so
2. We're 6" tall? Who said that? And there are far more than 101 ways to skin a cat
3. Some TPS creator guy managed to do this, so obviously it isn't impossible
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
13 Nov 2012 12:02 PM
K,

You could do it the physics way. Have you tried, setting an interupt up on ChanedProperty Y velocity. If > 0 then stuff -10 in it.

How about just constantly stick -20 in his Y vel. Does he still move? Yes, for the physics method I would try sticking random numbers in pretty-well every property Humanoid has.

For the dribble method, I did one for a hockey game 20 years ago; You stick the puck out in front of the Player (There were only 16 sirections), also offset by which frame of animation he was in, so it looked like he was controling the puck.

If that same point in front of a defending player was at the point of the puck & his Poke Check button was depressed, I shot the puck off in the direction Defending player was heading.

Won't that work for you? Every player has their imaginary little space in front of them?

Ok, 1001, but no more,
Brian
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
13 Nov 2012 12:05 PM
How about just constantly sticking -20 in his Y vel. (unless he is jumping, of coarse, but u can check for that).
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
13 Nov 2012 02:27 PM
Uhh...thanks, I'll try that. i think the player's arms will go up but at least they'll stop bouncing around the map.

also, another idea: weld a fake "foot" sticking out of the player's leg...this would make the ball move, not the real leg. Therefore, the character won't actually even touch the ball, and they won't bounce around like crazy
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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