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).
1
Re: trigger_vphysics_motion and locked movment
Posted by CooPs on Thu Apr 30th at 7:51pm 2009
Posted by CooPs on Thu Apr 30th at 7:51pm 2009
Previously known as RaPtoR
Re: trigger_vphysics_motion and locked movment
Posted by Funky Monk on Sat May 2nd at 3:22pm 2009

Funky Monk
member
5 posts
0 snarkmarks
Registered: Apr 27th 2009
Location: Grand Junction, Co (San Diego, is home)
Occupation: Job Seeker
Posted by Funky Monk on Sat May 2nd at 3:22pm 2009
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..
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..
Funky Monk
member
5 posts
0 snarkmarks
Registered: Apr 27th 2009
Location: Grand Junction, Co (San Diego, is home)
Occupation: Job Seeker
Re: trigger_vphysics_motion and locked movment
Posted by Riven on Sun May 3rd at 2:15am 2009
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.

-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.

Riven
super admin
1639 posts
802 snarkmarks
Registered: May 2nd 2005
Location: Austin, Texas, USA
Occupation: Architect
Posted by Riven on Sun May 3rd at 2:15am 2009
Assisted Answer
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.

-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.
Riven
super admin
1639 posts
802 snarkmarks
Registered: May 2nd 2005
Location: Austin, Texas, USA

Occupation: Architect
Re: trigger_vphysics_motion and locked movment
Posted by CooPs on Mon May 25th at 1:19am 2009
Posted by CooPs on Mon May 25th at 1:19am 2009
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!
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
1
© Snarkpit.net 2001 - 2023, about us, donate, contact
Snarkpit v6.1.0 created this page in 0.1636 seconds.

Snarkpit v6.1.0 created this page in 0.1636 seconds.

