trigger_vphysics_motion and locked movment

trigger_vphysics_motion and locked movment

Re: trigger_vphysics_motion and locked movment Posted by CooPs on Thu Apr 30th 2009 at 7:51pm
CooPs
2 posts
Posted 2009-04-30 7:51pm
CooPs
member
2 posts 0 snarkmarks Registered: Apr 30th 2009 Location: Sweden
Hello, I'm using the source engine to simulate a physics scenario we got in a class. To help me remove air friction and enable gravity, only when I want gravity I use a trigger_vphysics_motion which covers my entire map.

When my button enables gravity (by SetGravityScale input with 1 in parameter overide) the physboxes inside that hangs in the air wont start to fall. This is probably due to a source engine optimization where it doesn't check physboxes that has stopped their movement if they arn't affected by any external force. And beeing inside a vphysics_motion field that has it's gravity flipped won't make the engine recognize the sudden change.

Shooting one shot on the physboxes with a gun will make them start to fall though as the gunshot affects their motion a bit and will make the engine start handling their movment.

What would be the best solution to this problem?

Useless advices: (Don't bother suggesting this.)
  • Using a trigger_gravity instead. (Doesn't work on physics.)
  • Using sv_gravity instead. (CVAR doesn't exist in HL2ep2, it has been locked.)
Possible solutions:
  • Using a CVAR that makes the physics engine recheck all entities.
  • Triggering an entity that makes all entitys move a tiny tiny bit to make the engine start rechecking them (ugly solution).

Previously known as RaPtoR
Re: trigger_vphysics_motion and locked movment Posted by Funky Monk on Sat May 2nd 2009 at 3:22pm
Funky Monk
5 posts
Posted 2009-05-02 3:22pm
5 posts 1 snarkmarks Registered: Apr 27th 2009 Occupation: Job Seeker Location: Grand Junction, Co (San Diego, is home)
someone help this man STAT! I wana know the answer.

I'm 4 years rusty and can't map on a PC until I build on capable, but what if you have something that functions as an invisible force that slightly nudges whatever is there? No one has to see it, just have it push it laterally for a micro-second or something and make it spawn or work as soon as you hit the gravity enabling button.

Good luck man, I was just wondering if it were possible to make there be a lack of gravity in maps..
Re: trigger_vphysics_motion and locked movment Posted by Riven on Sun May 3rd 2009 at 2:15am
Riven
1640 posts
Posted 2009-05-03 2:15am
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
Well, I've been attempting to make this work myself (in order to help ya) for the past couple of hours. I encountered the same problems you described, and tried a number of work-arounds. I was able to get the effect you were looking for (supposedly) but the solution is one you've already outlined and also the one Funky Monk suggested). -As I can tell you've been at this for a while, thanks from saving us the trouble of having to offer those solutions you've already tried.

In addition to the trigger_vphysics_motion, I added a trigger_push to help get them moving. (the ugly solution). But I made its values so minute that you don't even notice it.
User posted image
-The trigger_vphysics_motion works flawlessly then! -Good enough to be used in an actual game level. However, I'm not sure how good it is for your needs. Here, why don't you try it out for yourself, and let me know if this is what you were looking for?

-download test_vphysics vmf and bsp here.
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: trigger_vphysics_motion and locked movment Posted by CooPs on Mon May 25th 2009 at 1:19am
CooPs
2 posts
Posted 2009-05-25 1:19am
CooPs
member
2 posts 0 snarkmarks Registered: Apr 30th 2009 Location: Sweden
Sorry.... I forgot that I even made this thread! (lol) It just came back to me...

My final solution ended up beeing simply using phys_timescale 0 -> phys_timescale 1 to freeze the simulation in the beginning.

I figured that using something like this would be possible. I will check out the neat example you made... sorry for forgetting again lol. And thanks for you time.

I made a video of my simulation that I can PM you later if you like.

Thanks!
Previously known as RaPtoR