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: Physics of Stairs and Ladders

Previous Thread :: Next Thread 
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
12 Mar 2012 09:18 PM
After the collision detection thread, this got me thinking, how does Roblox do their "stair" effect (if you walk up to a brick that's something like 2 or less above the bottom of the legs) or the "ladder" effect achieved by using a brick/space/brick/space/brick method to get the climbing effect. Does the physics engine check if there's only a difference of 2 between them after it knows that it came from the side for the stairs and then bump the character up above it? But wouldn't this then mean you can jump and miss a ledge by 2 bricks and still make it on top? So other methods?? And the ladder is completely a mystery to me.

Discuss. I think this is intriguing. (HotThoth, feel free to answer this thread quickly)
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
12 Mar 2012 09:43 PM
Funny how real discussion gets shoved to the bottom... bump (on Scripters, that's really sad)
Report Abuse
Merlin11188 is not online. Merlin11188
Joined: 20 Dec 2007
Total Posts: 4158
12 Mar 2012 09:47 PM
"Does the physics engine check if there's only a difference of 2 between them after it knows that it came from the side for the stairs and then bump the character up above it?"
I would think so. If I recall, you used to be able to jump (as you questioned) on ledges if you were only two studs low. The ladder works the same way. Two studs low, bump. Two studs low, bump.
Report Abuse
Brandonhare is not online. Brandonhare
Joined: 02 May 2007
Total Posts: 11005
13 Mar 2012 07:29 AM
I'm pretty sure the legs are cancollide-false, and the humanoid just constantly moves upward if they intersect something.
Report Abuse
HotThoth is not online. HotThoth
Forum Moderator
Joined: 24 Aug 2010
Total Posts: 1176
13 Mar 2012 12:53 PM
So... ladders are pretty much a huge hack, so let's push those aside for now XD.

But for stairs, brandonhare's actually pretty close. The legs *are* cancollide-false (we wouldn't want the walk animation to make your character kick away from walls or anything like that), but the trick is that we don't use object-object collision detection at all to keep the character on top of the ground! Instead, we use raycasting :D. It's much faster, great for Terrain and parts alike, stable, and will give us the contact point with the ground and expected depth of leg-into-ground penetration, all with a single call! (Although we can use one or two more raycasts for added stability, like at least make it one raycast for each leg you have).
Report Abuse
arundel is not online. arundel
Joined: 21 Apr 2008
Total Posts: 5762
13 Mar 2012 01:24 PM
@HotThoth, have you also noticed that the cancollide property of a brick when set to false, it still glitches and acts sometimes if there still is a collision response..?

Like when I set cancollide to false of a brick, and I walk into it very fast, the character moves up sometimes.. as if the cancollide were still set to true.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
13 Mar 2012 01:26 PM
>@HotThoth, have you also noticed that the cancollide property of a brick when set to false, it still glitches and acts sometimes if there still is a collision response..?

True, if you walk enough fast to an basepart which cancollide is set to false, you'll go on the top of the brick and fall down :PP
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
13 Mar 2012 01:28 PM
@Arundal, that generally happens with small bricks, as it's more difficult to catch collisions with smaller objects.
Report Abuse
arundel is not online. arundel
Joined: 21 Apr 2008
Total Posts: 5762
13 Mar 2012 01:35 PM
The point is that there should be no collision response when cancollide is set to false, but it still does sometimes.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
13 Mar 2012 01:40 PM
[ Content Deleted ]
Report Abuse
arundel is not online. arundel
Joined: 21 Apr 2008
Total Posts: 5762
13 Mar 2012 01:42 PM
@Oysi, I did that in 2008 and did funneh things in places and people were like: haaaxx xP
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
13 Mar 2012 01:42 PM
That proves that it performs a collide check also for parts which false as cancollide?
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
13 Mar 2012 01:44 PM
[ Content Deleted ]
Report Abuse
1Ra is not online. 1Ra
Joined: 02 May 2010
Total Posts: 2400
13 Mar 2012 01:59 PM
Also, if you have a copy of the torso, and weld it to the players torso, the player bumps down every few seconds, as if it broke his knees.
Report Abuse
HotThoth is not online. HotThoth
Forum Moderator
Joined: 24 Aug 2010
Total Posts: 1176
13 Mar 2012 02:50 PM
Yupyup; all of that cancollide-false-parts-actually-interacting-physically-with-world stuff... that's all because of the ladder code; stupid ladders >:P. (You'll notice that CanCollide false parts only interact physically like that with humanoids, and never with anything else).
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
13 Mar 2012 02:54 PM
Could you remake the ladder code with no_uglyhax_way?
Report Abuse
HotThoth is not online. HotThoth
Forum Moderator
Joined: 24 Aug 2010
Total Posts: 1176
13 Mar 2012 03:00 PM
It's kinda tricky. How do you determine what *is* a ladder (and should push your character up when you run into it) and what *isn't* a ladder? (and should do nothing when your character runs into it).
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
13 Mar 2012 03:06 PM
It depends on the way what you're currently using..
I would go with first checking the bricks above the brick what the humanoid collided with...
Report Abuse
Tenal is not online. Tenal
Joined: 15 May 2011
Total Posts: 18684
13 Mar 2012 03:42 PM
[ Content Deleted ]
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
13 Mar 2012 03:46 PM
@Emess

I don't see why you bother wasting our time with your pointless spam. You don't post anything productive, EVER.
Report Abuse
nightname is not online. nightname
Joined: 10 Jun 2008
Total Posts: 8960
13 Mar 2012 06:55 PM
@HotThoth

We recently decided to move the Bug_Log on to the official wiki, can you take a look at the current bugs. Remove them off the list when the bug is fixed.

http://wiki.roblox.com/index.php/Bug_Log
Report Abuse
Shobobo99 is not online. Shobobo99
Joined: 30 Dec 2008
Total Posts: 5754
13 Mar 2012 07:04 PM
@HotToth

You could scrap ladders and just force people to use trusses (with added properties to customize properly).
Report Abuse
Merlin11188 is not online. Merlin11188
Joined: 20 Dec 2007
Total Posts: 4158
13 Mar 2012 07:05 PM
@HotThoth:
You simply make a "ladder"-type part and advertise it an insane amount with a pretty texture and pretty colors :D
Report Abuse
Shobobo99 is not online. Shobobo99
Joined: 30 Dec 2008
Total Posts: 5754
13 Mar 2012 07:07 PM
@merlin

or they could just make trusses more customizable :S
Report Abuse
HotThoth is not online. HotThoth
Forum Moderator
Joined: 24 Aug 2010
Total Posts: 1176
13 Mar 2012 07:11 PM
@nightname: so far there are only 4 bugs in the Bug Log? (I'd probably at least want to also add that the reset button breaks welds or that the undo button doesn't undo terrain edits, since those two can lead to tragedy if not known).
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