quote:Originally posted by ventilator: i guess this mattress effect could be done with the new bonerotate commands and some invisible cubes connected with hinges.
If I had the demo (in order to break it) I could probably tell you how they have done that My guess is that they are using a simple cloth (mass-spring) system extended to 3 dimensions (as opposed to 2 for the regular cloth grid)- then just move the corner vertices, contract the springs, and interpolate the intermediate vertices. Similar to what you were suggesting with bones and invisible cubes.
quote:i tried it right after seeing the halflife2 video but it was trickier than i thought. it would be easier if all physics entities (not only constraints) had motors. or do you think i should just turn off physics for the object while holding it with the grav-gun?
I would estimate the target position of the object using the current view vector scaled by the object's initial distance. Then take the difference between that target and the object's current location, scale this by the object's mass and framerate and use this scaled difference as parameter for addcentralforce. So basically you just add linear force correction whenever the object is not where it's supposed to be. It seemed like the Valve guys used a number of rods connected via (motorized) ball joints, similar to what you did with the crane. But that might be overkill. Of course that's all just physics- the important part is finding the right flare bitmaps
Re: physics in water#15732 05/30/0304:0405/30/0304:04
quote:Originally posted by Devilery: Marco, as you know maybe, I'm working together with Doc_Joe.So I know that the warlock must become invisible.Thats not a bug.
It was hard to tell- how about fading him out instead or do some spell casting if hit?
Re: physics in water#15733 05/30/0315:3405/30/0315:34
quote: Then take the difference between that target and the object's current location, scale this by the object's mass and framerate and use this scaled difference as parameter for addcentralforce.
this is what i tried. the problem is that the object oscillates back and forth at the target a little too extreme. maybe i should try to increase damping or something like that if the entity gets closer to the target.
Re: physics in water#15734 05/30/0320:1105/30/0320:11
yes! the gun increases damping now and that improved it! my gravitation-gun works now! -> physics_demo.zip (right mouse button -> gravitation gun)
it isn't possible to shoot the entity like in halflife2 yet. i will add this later, this is just the first working version...
i think i read something about an undocumented ph_trace command somewhere? i would need that now. is this ph_trace the same as the new c_trace from the beta.txt?
Re: physics in water#15735 05/31/0303:2205/31/0303:22
Great demo, as usual. It's so much easier to move stuff with the gravity gun that it is with the crane. I am not sure about the 6.0 ph_trace implementation. The current beta and all future releases will use c_trace(vecfrom,vecto,trace_mode) for accurate tracing.
I guess the next big challenge will be to create a jointed humanoid, arachnoid, etc.
Re: physics in water#15736 05/31/0303:3305/31/0303:33