Solved Disable Collisions

Anand

New member
Messages
20
Reactions
1
Points
3
Is there a way to force disable collisions on all characters? This issue comes about when loading a scene with multiple Looks to perform MMD dances. Most multi person MMD routines locate all characters at the origin (0,0,0) and with an offset (typically on the X,Z plane) on the motherbone. I think MMD plugins for VAM (I use MMD2timeline) move characters to the origin first and them translate them to the offset. The result of the initial co-location at the origin is that there are explosions galore - body parts are flying everywhere.

I currently solve this problem by moving the animation slider slightly off the start point (to separate the Looks), cycling through each Look's Control & Physics 1 tab and deselecting the collision check box AND clicking on the Physics Explosion Recovery button. Unfortunately, I have to uncheck the Collision box several times because the selection gets re-enabled (probably via the plugin when it "resets" the Look).

Please let me know if there is a way to force no collisions on all characters at the load of the scene, and then for collisions to manually enabled when I want.
 
Not without modifying the scene first or using a plugin that does this but that probably doesn't exist.
A compromise is using UIAssist, it helps you do that really quickly if you set a button to disable collision on a gazed person, among many other useful things it can do,
 
Upvote 0
Well, you can try this simple script (save to Custom/Scripts, load to session or on an empty atom for example)

EDIT: updated with an option to also disable person atoms collision on scene loaded so that this works reliably for scene loads as well, rather than just freshly added atoms.

I dunno if there's use for this for other people, I'll just leave this here for now. Maybe adding to the next Snippets release
 

Attachments

  • DisableCollisionOnAddPerson.cs
    2 KB · Views: 0
Last edited:
Upvote 0
Well, you can try this simple script (save to Custom/Scripts, load to session or on an empty atom for example)

EDIT: updated with an option to also disable person atoms collision on scene loaded so that this works reliably for scene loads as well, rather than just freshly added atoms.

I dunno if there's use for this for other people, I'll just leave this here for now. Maybe adding to the next Snippets release
Thanks everlaster. It didn't work for me. Just in case I made a mistake, here's what I did:

- I downloaded your script to Custom\Scripts
- I created a scene with 3 characters: All are located at (0,0,0). I manually disabled collision on all of them.

Attempt 1
- I created an Empty Atom. I added your script as a Plugin to that Atom. The two options are checked as default.
- I saved the scene with the 3 characters and the Empty Atom.
- Upon opening that scene, there was an explosion of skin and boobies.

Attempt 2
- I re-used same scene after calming everything down by manually unchecking Collisions and doing Explosion Recovery.
- I removed the Empty Atom.
- I added the script as a Session Plugin. I checked the Plugin's Custom UI to make sure the two options are checked.
- I set a new Session Plugin Default with the addition of your script.
- I saved this version of the scene.
- I loaded another scene as a palate cleanser. Then I reloaded the 3 person scene.
- No dice. Explosions galore.

Sorry for the bother. It was a good thought. But VAM seems really like defaulting to collisions.

Atani, thanks for the input. I may need to resort to this as it is in theory faster than my current method of cycling through each character.
 
Upvote 0
Thanks everlaster. It didn't work for me. Just in case I made a mistake, here's what I did:

- I downloaded your script to Custom\Scripts
- I created a scene with 3 characters: All are located at (0,0,0). I manually disabled collision on all of them.

Attempt 1
- I created an Empty Atom. I added your script as a Plugin to that Atom. The two options are checked as default.
- I saved the scene with the 3 characters and the Empty Atom.
- Upon opening that scene, there was an explosion of skin and boobies.

Attempt 2
- I re-used same scene after calming everything down by manually unchecking Collisions and doing Explosion Recovery.
- I removed the Empty Atom.
- I added the script as a Session Plugin. I checked the Plugin's Custom UI to make sure the two options are checked.
- I set a new Session Plugin Default with the addition of your script.
- I saved this version of the scene.
- I loaded another scene as a palate cleanser. Then I reloaded the 3 person scene.
- No dice. Explosions galore.

Sorry for the bother. It was a good thought. But VAM seems really like defaulting to collisions.

Atani, thanks for the input. I may need to resort to this as it is in theory faster than my current method of cycling through each character.
If you saved the scene after manually disabling collision on your person atoms, then collision should be disabled already when you load the scene. It shouldn't be necessary to use any plugin to achieve that. If the atoms are not keeping the collision off state that you saved them with, then you have something else in your setup that forces collision to be enabled on scene load.

That aside, adding the plugin to an Empty atom probably doesn't work properly for disabling collision on scene load, since it doesn't disable collision when the plugin initializes, it only disables collision when it detects a scene load. But the plugin doesn't detect the scene load of the scene that it is part of. I can make it disable collision on initialization as well if that's necessary. For now, to disable collision on scene load, you would want to use it as a session plugin.

Anyway, I think you have something else that enables collision on the atoms. Some other session plugin perhaps?
 
Upvote 0
You may be right. But I can't figure out what is causing it. Here's a list of my default Session Plugins. I don't think any of these are the culprit

JayJayWon BrowserAssist
JayJayWon ForcePersonCache
KeyBindings
MVRPlugin.AutoConfirmLoadOfPlugins
MVRPlugin.SettingsCycleNextPerson
MVRPlugin.EditModeOnSceneLoad
DisablePostMagic
VarBrowser.VarBrowserSessionPlugin
CheesyFX.LightMeUp
CheesyFX.CheesyDoF
CheesyFX.ViewScan
PluginIdea.MouseWheelToSlider
VamCuaSuperglue
everlaster.DisableCollissoinOnAddPerson
 
Upvote 0
Sounds like there's a load preset action. You can try turning it off by checking the trigger actions. If it's not being done via timeline then it's on a button or in the scene animation triggers section etc.
 
Upvote 0
I think I may know what's going on. The MMD2Timeline plugin is attached to a char in this scene. When this char is loaded during scene load, the plugin turns on collision for all the atoms.

If I save a scene containing multiple characters all standing at the same location with collision turned off and most importantly without the plugin, the scene loads fine. There are no explosions.

Thanks for all your help.

EDIT:
I was able to solve my collision issue with MMD2timeline. Someone else pointed the way to editing scripts within the VARs to fix some joint rotation bug in the plugin. Taking a hint, I started scrounging around inside the VAR. I looked through the various scripts and found where the plugin was enabling collisions. Once this was disabled, everything works. No more explosions !!! Praise be. No more flying boobies.
 
Last edited:
Upvote 0
Back
Top Bottom