Page 1 of 2

Stairs

PostPosted: Fri Jun 11, 2010 8:57 am
by PeteC
How are stairs set up in URU? Is it a slope with visual steps or is it physical steps?

Re: Stairs

PostPosted: Fri Jun 11, 2010 9:03 am
by Aloys
You can either assign the collision directly to your visible mesh, but the prefered method is to have a separate collider mesh, a simple plane that covers all the steps. That makes collisions simpler and smoother.
You can import Cyan Ages in Blender using the PyPRP importer and look at their stairs.

Re: Stairs

PostPosted: Fri Jun 11, 2010 10:01 am
by Chacal
Aloys wrote:You can either assign the collision directly to your visible mesh


Please don't do that. Climbing stairs becomes a huge pain.

Re: Stairs

PostPosted: Fri Jun 11, 2010 10:08 am
by Tweek
I can never get stairs right, I add a separate collision but they're always sluggish to climb. I've even used stairs from a Cyan model with the same issue.

Re: Stairs

PostPosted: Fri Jun 11, 2010 11:07 am
by Aloys
Chacal wrote:
Aloys wrote:You can either assign the collision directly to your visible mesh


Please don't do that. Climbing stairs becomes a huge pain.

I know, but I need some excercice. :(

I can never get stairs right, I add a separate collision but they're always sluggish to climb
I've never had that problem, has long as your slope is bellow 30° it's fine. Above that number however, things can get messy quickly.

Re: Stairs

PostPosted: Fri Jun 11, 2010 12:09 pm
by D'nial
I think it has something to do with how current software for creating fan Ages handles colliders. I've also noticed that if you hit a wall or other near-vertical object, or if you jump on a slope, the game bounces your avatar back a foot or so. This doesn't happen in Cyan's Ages.

Re: Stairs

PostPosted: Fri Jun 11, 2010 1:38 pm
by D'Lanor
Yes, PyPRP seems to use different defaults for elasticity, friction etc. than Cyan's ages. In early PyPRP versions we had to set those manually for every collider. It is still possible to do so but the only time we really need it now is for tweaking kickables.

Edit: Hmm, it looks like PyPRP has a bug that sets elasticity to -1 by default instead of 0. :o

Edit 2: prp_ObjClasses.py

Code: Select all
            # retrieve elasticity from alcscript
            self.fEL = float(FindInDict(objscript,"physical.elasticity",-1.0))
            if self.fEL == -1.0:
                # retrieve elasticity from logic property if not in alcscript
                self.fEL = getFloatPropertyOrDefault(obj,"el",-1.0)
            if self.fEL < 0.0:
                print "  No Elasticity set"
            else:
                print "  Elasticity:",self.fEL


I think this should be:

Code: Select all
            # retrieve elasticity from alcscript
            self.fEL = float(FindInDict(objscript,"physical.elasticity",-1.0))
            if self.fEL == -1.0:
                # retrieve elasticity from logic property if not in alcscript
                self.fEL = getFloatPropertyOrDefault(obj,"el",-1.0)
            if self.fEL < 0.0:
                print "  No Elasticity set"
                # reset to 0.0
                self.fEL = 0.0
            else:
                print "  Elasticity:",self.fEL


Edit 3: And tested in an exported age now. No more bouncing! :D Yay!

Edit 4: There is a downside though. The bouncing actually made it easier to climb steps. Even tiny doorsteps which before the fix could be stepped over easily are stopping the avatar dead in its tracks now and have to be jumped. :(

Re: Stairs

PostPosted: Fri Jun 11, 2010 2:32 pm
by D'Lanor
And here's another difference: Cyan's default friction: 0.5, PyPRP's default friction: 10 :shock:

Edit: Ok, I fixed this one as well and the doorsteps are no longer a problem now. 8-) Overall everything feels more natural in my age. Apparently the high friction in PyPRP was a compensation for the bouncing.

So... I guess we want Cyan's default settings in PyPRP as well, don't we? It does mean that some ages may require a bit of tweaking.

Edit 2: Ok, fix posted for testing in the PyPRP forum.

Re: Stairs

PostPosted: Fri Jun 11, 2010 3:25 pm
by D'nial
I helped fix something! I am the greatest!

Not only that, but this might just be the change that makes Maw bearable! :P

Re: Stairs

PostPosted: Fri Jun 11, 2010 4:09 pm
by Aloys
Well, that explains why my stairs were working despite the lack of colliders.
However that fix will be problematic for me as the streets in Ahra Pahts as were set up with these incorrect settings in mind. I have only two solutions though: manually adding back the 'old' elasticity/friction settings, or tweaking the collider mesh.. hmm..