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
 

"Body dragging" theory

Previous Thread :: Next Thread 
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
16 Apr 2015 12:25 AM
So I've been piecing together quite a bit of code in an effort to allow players in my game I'm working on drag dead bodies, or ragdoll models, if you will. It's not exactly "not" working, and the logic behind it feels solid, unless I'm going about it in the worst way possible.
The way the code handles everything is pretty simplistic, as intended. It uses a body position initially to attempt and drag the given limb as close as the settings entail. There's a time limit for it to complete this task and reach the anticipated location, if it doesn't fulfill this deed, it cuts off. Otherwise, it well create a "pseudo" part, where the limb is, and weld it to the torso. The limb is then welded to the pseudo part using a glue, and the player is SUPPOSED to be able to drag them around with ease. Of course this is not the case.
The code I've written is rather extensive, so I'll try to pinpoint specific problems I've encountered, and see if anyone has any ideas.
When you go into first person, for some reason the orientation of the player's character model changes in such a way that the glue is instantly broken. Not sure how I'd even begin to fix that.
Sometimes the player's character, more often than not, actually, will collide with the limb ragdoll. This will either lead to the glue giving out, or the limb glue giving out. This is problematic, not sure how to fix that, either.
On occasion, the ragdoll just straight up explodes and flings the dragger into space. It's hilarious. Problematic, though.

references(ignore swears, please);

ragdoll module;
http://hastebin.com/caforufoko.lua
body dragging, member of my interaction service;
http://hastebin.com/ozeyazikiq.lua

-=Robo=-
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
16 Apr 2015 12:45 AM
Probably won't get much help beings it's a rather complex problem and most of the people here don't have the time to invest in that. Still worth a shot, it's either I get a little bit of guidance or I scrap the idea until the new physics engine is released(which might still be difficult to work with).

-=Robo=-
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
16 Apr 2015 02:23 AM
Why use glue and not another normal weld?
Report Abuse
MillerSoRock is not online. MillerSoRock
Joined: 27 Feb 2010
Total Posts: 4888
16 Apr 2015 02:34 AM
Why use glue and not another normal weld?[2]
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
16 Apr 2015 02:37 AM
Glue joints act nothing like weld joints guys.


I script -~ chimmihc
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
16 Apr 2015 10:44 AM
Any weld besides the glue joint variation will not behave as anticipated. Have you guys never worked with ragdolls? :P

-=Robo=-
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
16 Apr 2015 10:48 AM
Well, I mean. I guess it would behave as anticipated either way, but using aanything other than glue doesn't really appeal to what I had in mind, and it doesn't look dynamic. Like I said, I'm looking for a different way to go about this, so any ideas or even some speculation would be appreciated.

-=Robo=-
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
16 Apr 2015 10:49 AM
You could always force the glue to stay attached with the Changed event or a really fast loop, although it might not be the most efficient way.
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
16 Apr 2015 10:54 AM
Not a bad idea. Another problem I encountered and forgot to mention because I was kind of out of it, when you click off the window, the frame rate drops, and I guess that causes it to explode? I've had glues in completely stable environments explode just because I clicked off studio lol

-=Robo=-
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
16 Apr 2015 10:57 AM
Does it do that in online mode as well? Seems like a buggy client thing.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
16 Apr 2015 11:00 AM
Check for UIS InputEnded UserInputType.Focus to nuke the welds locally for until InputBegan again
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
16 Apr 2015 11:02 AM
Haven't checked @Ashley, and I didn't understand that very well, Lunate xD

-=Robo=-
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
16 Apr 2015 01:24 PM
Bump. Anyone else have any ideas?
An alternative to the ragdolls would just be creating a dead body animation rig that can be dragged around, or, instead of welding it to the player character, I could bound a bodyposition's position property in reference to the mouse. A problem with that would be latency, assuming filtering is enabled. Solution to the latency? I don't want to fire to a remote in a while loop, but ROBLOX doesn't want to allow us to whitelist objects from filtering.

-=Robo=-
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
16 Apr 2015 01:37 PM
woo

-=Robo=-
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