Stairs

General debates and discussion about the Guild of Writers and Age creation

Stairs

Postby PeteC » Fri Jun 11, 2010 8:57 am

How are stairs set up in URU? Is it a slope with visual steps or is it physical steps?
PeteC
 
Posts: 18
Joined: Sat Jun 05, 2010 5:41 pm

Re: Stairs

Postby Aloys » Fri Jun 11, 2010 9:03 am

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.
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: Stairs

Postby Chacal » Fri Jun 11, 2010 10:01 am

Aloys wrote:You can either assign the collision directly to your visible mesh


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


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2515
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Stairs

Postby Tweek » Fri Jun 11, 2010 10:08 am

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.
Beneath - IC Blog.
Beneath: Ages of Tweek - FB Age Dev Page.
User avatar
Tweek
 
Posts: 693
Joined: Sat Sep 29, 2007 6:37 am

Re: Stairs

Postby Aloys » Fri Jun 11, 2010 11:07 am

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.
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: Stairs

Postby D'nial » Fri Jun 11, 2010 12:09 pm

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.
If I had a signature, this is where it would be...
User avatar
D'nial
 
Posts: 131
Joined: Thu Jun 25, 2009 12:45 pm
Location: In a world where all men are guilty until proven dead!

Re: Stairs

Postby D'Lanor » Fri Jun 11, 2010 1:38 pm

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. :(
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Stairs

Postby D'Lanor » Fri Jun 11, 2010 2:32 pm

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.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Stairs

Postby D'nial » Fri Jun 11, 2010 3:25 pm

I helped fix something! I am the greatest!

Not only that, but this might just be the change that makes Maw bearable! :P
If I had a signature, this is where it would be...
User avatar
D'nial
 
Posts: 131
Joined: Thu Jun 25, 2009 12:45 pm
Location: In a world where all men are guilty until proven dead!

Re: Stairs

Postby Aloys » Fri Jun 11, 2010 4:09 pm

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..
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests