|
Re: physics in water
#15731
05/30/03 04:02
05/30/03 04:02
|
Anonymous
OP
Unregistered
|
Anonymous
OP
Unregistered
|
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/03 04:04
05/30/03 04:04
|
Anonymous
OP
Unregistered
|
Anonymous
OP
Unregistered
|
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/03 15:34
05/30/03 15:34
|
Joined: May 2002
Posts: 7,441
ventilator
Senior Expert
|
Senior Expert
Joined: May 2002
Posts: 7,441
|
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/03 20:11
05/30/03 20:11
|
Joined: May 2002
Posts: 7,441
ventilator
Senior Expert
|
Senior Expert
Joined: May 2002
Posts: 7,441
|
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/03 03:22
05/31/03 03:22
|
Anonymous
OP
Unregistered
|
Anonymous
OP
Unregistered
|
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.
|
|
|
|