How to Disable a Collider Object [Solved]

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

How to Disable a Collider Object [Solved]

Postby TheMagician » Fri Apr 29, 2011 12:54 pm

Sorry for another new post. But I really don't get this.

I've created a box object and assigned a physics component to it (terrain with hull collision). I also attached a NoShow component to hide the object.
Now I want to create a responder which can disable this collider in order for me to pass through.

I thought that "Enable/Disable -> Physical" is used to achieve this effect. But it turns out that "physical" refers to dynamic moveable objects which are activated/deactivated by this command.
I have not yet found a way to enable/disable a collider object. The component "ex InvisibleBlocker" doesn't do anything for me. I can walk right through it.

Any help is appreciated.

EDIT: ANSWER TO THE QUESTION: You cannot enable/disable the collision of an object that has a "terrain" or "proxy terrain" component attached. Instead you have to use "exclude regions" to block the player when you do not want them to enter a certain area. Read through this thread for a very detailed tutorial on "exclude regions" and how to set them up by Andylegate.
Last edited by TheMagician on Sat Apr 30, 2011 9:39 am, edited 1 time in total.
TheMagician
 
Posts: 110
Joined: Mon Mar 29, 2010 3:14 pm

Re: How to Disable a Collider Object

Postby N. Sigismund » Fri Apr 29, 2011 1:05 pm

Have you looked into exclude regions? I know that's sort of vague - and getting an exclude region to work like that may need either some creative use of Cyan's python or your own - but certainly for xStandardDoor.py they're used to prevent people getting into a certain area under certain conditions, and at all other times are off.

It would also be kind of... inventive, I probably should say, :lol: but you could always animate the invisible collider so that it moves out of the way instantly once it's required to.
For reference:
IC: Nye Morgan
OOC: Sigismund, Nye, Huw Dawson
N. Sigismund
 
Posts: 212
Joined: Tue Jun 08, 2010 10:39 am

Re: How to Disable a Collider Object

Postby TheMagician » Fri Apr 29, 2011 1:14 pm

I've clicked around with exlude regions a bit but I don't get how they work (and don't have the nerve right now to figure it out ;) ).

In the worst case I really have to animate the boxes but that's really not very elegant.

In another post Andylegate sounded like he had some experience with enabling/disabling collider boxes. Perhaps he can enlighten us.
TheMagician
 
Posts: 110
Joined: Mon Mar 29, 2010 3:14 pm

Re: How to Disable a Collider Object

Postby andylegate » Fri Apr 29, 2011 2:07 pm

If you put a NoShow component on it, you need to make sure that you have checkmarks where it says Drawables and Physicals. And you need to put a check up where it says: "Disable only because I may want to enable it later, etc, etc, etc"

Personally, I never use Terrain component for invisible colliders anymore. I use ProxyTerrain, because it automatically make the collider not visible.

You can make a visible object (bars, door, etc) and give it a Terrain component, then animate it, so that it's out of the way when the player can go, and in the way when the player shouldn't go.

Exclusion Regions: Exclusion Regions are a multiplayer component polishing (Cyan's words, not mine). They are used to move players out of the way so that a door doesn't crush them, so your elevator doesn't squash them, etc, etc, etc.

To make a Exclusion Region, you can make the region itself, the same size as the object you don't want to crunch the player. You also will need to use a Dummy, and put it where you want the player to go if the Door/Elevator/whatever starts to move. This is called the Safety Point.
Put a Multi Beh Mod on this dummy. Use the Idle avatar animation (that's the name of it, "Idle") and check mark "Use Smart Seek"

Go back to your Exclude Region, and put a Exclude Region component on it (if you have not done so already). In the roll out box, where it says Safety Points, click on the Add button. A new window will apear, listing all your One Shots and Multi Beh Mods. Pick the one that you made as your Safety Point.
If you need the avatar to be blocked right off the bat (when they first link in), you need to put a check mark where it says "initially cleared"

"Clear" or "Cleared" means to clear the avatar out of the way (and it will block the player too).
"Release" or "Released" means to let the avatar through, don't move the avatar, etc, etc.

I know, I know. Nomenclature with Cyan sucks sometimes :rolls eyes:

Now you'll need to include this Exclusion Region in your responder (or Python file if you are using a custom made python file that is controlling things). You'll see that in the responder you'll have "Clear" and "Release" when you put your cursor on Exclusion REgion.
Just remember: Clear is to CLEAR AWAY AND BLOCK. Release is to RELEASE THE AVATAR AND LET THEM THROUGH.

Whew. Okay, hope this helped.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: How to Disable a Collider Object

Postby andylegate » Fri Apr 29, 2011 2:24 pm

Almost forgot:

On your safety point, in your Multi Beh Mod roll out, make sure you put a check mark where I have circled, else it will not work correctly:

Image
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: How to Disable a Collider Object

Postby GPNMilano » Fri Apr 29, 2011 2:26 pm

andylegate wrote:If you put a NoShow component on it, you need to make sure that you have checkmarks where it says Drawables and Physicals. And you need to put a check up where it says: "Disable only because I may want to enable it later, etc, etc, etc"

Personally, I never use Terrain component for invisible colliders anymore. I use ProxyTerrain, because it automatically make the collider not visible.

You can make a visible object (bars, door, etc) and give it a Terrain component, then animate it, so that it's out of the way when the player can go, and in the way when the player shouldn't go.

Exclusion Regions: Exclusion Regions are a multiplayer component polishing (Cyan's words, not mine). They are used to move players out of the way so that a door doesn't crush them, so your elevator doesn't squash them, etc, etc, etc.

To make a Exclusion Region, you can make the region itself, the same size as the object you don't want to crunch the player. You also will need to use a Dummy, and put it where you want the player to go if the Door/Elevator/whatever starts to move. This is called the Safety Point.

Go back to your Exclude Region, and put a Exclude Region component on it (if you have not done so already). In the roll out box, where it says Safety Points, click on the Add button. In the scene pick the dummy that you created for your Safety Point.
If you need the avatar to be blocked right off the bat (when they first link in), you need to put a check mark where it says "initially cleared"

"Clear" or "Cleared" means to clear the avatar out of the way (and it will block the player too).
"Release" or "Released" means to let the avatar through, don't move the avatar, etc, etc.

I know, I know. Nomenclature with Cyan sucks sometimes :rolls eyes:

Now you'll need to include this Exclusion Region in your responder (or Python file if you are using a custom made python file that is controlling things). You'll see that in the responder you'll have "Clear" and "Release" when you put your cursor on Exclusion REgion.
Just remember: Clear is to CLEAR AWAY AND BLOCK. Release is to RELEASE THE AVATAR AND LET THEM THROUGH.

Whew. Okay, hope this helped.


There FIXED. You do not need to attach anything to this dummy other then the page info node, and select the actual object in the exclude region's rollout box.

Andy, I suggest you take a look at some of the attachments to the scene objects in the prps. This will help so that you don't attach unnecessary things to objects and make more work for yourself than is actually needed.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: How to Disable a Collider Object

Postby N. Sigismund » Fri Apr 29, 2011 3:02 pm

You know, I do wonder exactly what it is with this site and constantly having Andy's posts followed up by immediate "actually, this is right" responses. Although it is helpful to get completely correct information, so corrections are appreciated.

Cheers for the info Andy - I'm trying to get exclude regions to work on my end as part of xStandardDoor and it's not been working, which is why the release of Llantern I'm putting out tonight has a non-functional door. :lol: Is there any chance of a complete tutorial on xStandardDoor, now that we're in a situation where we need to really think about basic multiplayer stuff?
For reference:
IC: Nye Morgan
OOC: Sigismund, Nye, Huw Dawson
N. Sigismund
 
Posts: 212
Joined: Tue Jun 08, 2010 10:39 am

Re: How to Disable a Collider Object

Postby andylegate » Fri Apr 29, 2011 3:37 pm

No, no, it's all right. Chole's not saying I'm wrong, however she is right. You don't have to use a One Shot or a Multi Beh Mod on your dummy safety point if you don't want to.

But neither am I wrong about it.

I give you, Bevin, classroom door. The safety point is also the one shot for avatar animation for touching the door:

Code: Select all
plExcludeRegionModifier>
   <plKey Name="cXrgnClassRmDoor" Type="plExcludeRegionModifier" Location="3;3" LocFlag="0x0000" ObjID="1" />
   <SynchParams flags="0x00000000">
      <ExcludePersistentStates></ExcludePersistentStates>
      <VolatileStates></VolatileStates>
   </SynchParams>
   <ModFlags>
      <hsBitVector></hsBitVector>
   </ModFlags>
   <ExcludeRegionParams Seek="False" SeekTime="10" />
   <SafePoints>
      <plKey Name="behPvtRmDoorLeftExt" Type="plSceneObject" Location="3;3" LocFlag="0x0000" ObjID="64" />
   </SafePoints>
</plExcludeRegionModifier>


and here is the plKey attached to it, it's a One Shot:

Code: Select all
      <plKey NULL="True" />
   </AudioInterface>
   <Interfaces>
   </Interfaces>
   <Modifiers>
      <plKey Name="cBehDoorBtnTouch_2" Type="plOneShotMod" Location="3;3" LocFlag="0x0000" ObjID="8" />
   </Modifiers>
   <SceneNode>
      <plKey Name="Neighborhood_nb01" Type="plSceneNode" Location="3;3" LocFlag="0x0000" ObjID="1" />
   </SceneNode>
</plSceneObject>



Chole is just saying : "Don't put extra stuff on something you don't have to." and she's correct.

The reason I like to use Multi Beh Mod's on these guys, so so I can use the DOH! animation after the player has just tried to get themselves cut in two by a door.

It's all about how you want to do it, and either my way, or Chole's way will work.

What problem are you having with xStandardDoor.py Nye?
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: How to Disable a Collider Object

Postby TheMagician » Sat Apr 30, 2011 1:38 am

Thanks for the explanation about exclude regions. This could be a wiki tutorial *hint* ;)
However, I understand that they are only needed as an addition to invisible colliders.

Now back to my main problem. Andy, you write:
You can make a visible object (bars, door, etc) and give it a Terrain component, then animate it, so that it's out of the way when the player can go, and in the way when the player shouldn't go.


As soon as I animate the object all physical attributes seem to be lost. I can walk right through it wherever it is. This is so frustrating :evil: but I'm sure everybody who has worked with Plasma knows that feeling ;)
TheMagician
 
Posts: 110
Joined: Mon Mar 29, 2010 3:14 pm

Re: How to Disable a Collider Object

Postby wodan944 » Sat Apr 30, 2011 2:05 am

Hi, maybe you should give it a ProxyTerrain, that helped me by making animated objects.

Wodan944
Creativity involves breaking out of established patterns in order to look at things in a different way.

Edward De Bono
User avatar
wodan944
 
Posts: 52
Joined: Wed Jan 07, 2009 12:37 pm

Next

Return to Building

Who is online

Users browsing this forum: No registered users and 6 guests

cron