Re: [hlcoders] Physics Problem

2009-03-05 Thread Grash

The real answer to this problem is: 

A) It doesn't matter what you do with the solid flags, 
- unless -
B) you give an object a shove to move 

It's right there in the comments on the solid flag. Go figure. :P



--- On Fri, 2/20/09, Grash  wrote:

From: Grash 
Subject: Re: [hlcoders] Physics Problem
To: "Discussion of Half-Life Programming" 
Date: Friday, February 20, 2009, 4:47 PM


Yea, the func_breakable is doing what we're looking for. 
Thanks... 

--- On Fri, 2/20/09, Ryan Sheffer  wrote:

From: Ryan Sheffer 
Subject: Re: [hlcoders] Physics Problem
To: "Discussion of Half-Life Programming" 
Date: Friday, February 20, 2009, 4:29 PM

When the object is disabled it isn't forcing a physics update on physics
props touching it. You just need to force a physics update on those props on
disable. I am pretty sure the code to do this can be found in the
func_breakable as I believe when those break the physics objects update
accordingly.

Cheers.

On Fri, Feb 20, 2009 at 1:16 PM, Grash  wrote:

> Here's the setup: I have a prop_physics on top of a func_brush.
> When the brush is disabled, either through code or though script (via a
> trigger), the physics object does not drop to the ground.
>
> When I slightly push the prop_physics with another prop, it can get into a
> position where it will swing in the air from a corner on the model.
>
> When I pick up the object and throw it through the disabled brush, it moves
> through it as intended.
>
> The player moves through the brush in the correct manner (Colliding when
> enabled and moving through when disabled) in all cases. This includes when
> the player or NPC (Combine Solider) stands on top of the brush and falls
> through it correctly when it is disabled.
>
> What am I missing here in the code?
>
>
>
>
>
>
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>


-- 
~Ryan ( skidz )
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




      
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




  
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Physics Problem

2009-02-20 Thread Grash

Yea, the func_breakable is doing what we're looking for. 
Thanks... 

--- On Fri, 2/20/09, Ryan Sheffer  wrote:

From: Ryan Sheffer 
Subject: Re: [hlcoders] Physics Problem
To: "Discussion of Half-Life Programming" 
Date: Friday, February 20, 2009, 4:29 PM

When the object is disabled it isn't forcing a physics update on physics
props touching it. You just need to force a physics update on those props on
disable. I am pretty sure the code to do this can be found in the
func_breakable as I believe when those break the physics objects update
accordingly.

Cheers.

On Fri, Feb 20, 2009 at 1:16 PM, Grash  wrote:

> Here's the setup: I have a prop_physics on top of a func_brush.
> When the brush is disabled, either through code or though script (via a
> trigger), the physics object does not drop to the ground.
>
> When I slightly push the prop_physics with another prop, it can get into a
> position where it will swing in the air from a corner on the model.
>
> When I pick up the object and throw it through the disabled brush, it moves
> through it as intended.
>
> The player moves through the brush in the correct manner (Colliding when
> enabled and moving through when disabled) in all cases. This includes when
> the player or NPC (Combine Solider) stands on top of the brush and falls
> through it correctly when it is disabled.
>
> What am I missing here in the code?
>
>
>
>
>
>
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>


-- 
~Ryan ( skidz )
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




  
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Physics Problem

2009-02-20 Thread Ryan Sheffer
When the object is disabled it isn't forcing a physics update on physics
props touching it. You just need to force a physics update on those props on
disable. I am pretty sure the code to do this can be found in the
func_breakable as I believe when those break the physics objects update
accordingly.

Cheers.

On Fri, Feb 20, 2009 at 1:16 PM, Grash  wrote:

> Here's the setup: I have a prop_physics on top of a func_brush.
> When the brush is disabled, either through code or though script (via a
> trigger), the physics object does not drop to the ground.
>
> When I slightly push the prop_physics with another prop, it can get into a
> position where it will swing in the air from a corner on the model.
>
> When I pick up the object and throw it through the disabled brush, it moves
> through it as intended.
>
> The player moves through the brush in the correct manner (Colliding when
> enabled and moving through when disabled) in all cases. This includes when
> the player or NPC (Combine Solider) stands on top of the brush and falls
> through it correctly when it is disabled.
>
> What am I missing here in the code?
>
>
>
>
>
>
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>


-- 
~Ryan ( skidz )
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Physics Problem

2009-02-20 Thread Jonas 'Sortie' Termansen
Now, I haven't messed with the physics system, but it sounds like the prop 
is unaware things have changed. Props in Source that haven't moved for a 
while, aren't physically simulated, for performance reasons. I would find a 
way to broadcast an event that tells nearby props that they need to be 
simulated. (Or hackier: Simply find all nearby props and move them a little 
or something.)

- Sortie.

- Original Message - 
From: "Grash" 
To: "Discussion of Half-Life Programming" 
Sent: Friday, February 20, 2009 10:16 PM
Subject: [hlcoders] Physics Problem


Here's the setup: I have a prop_physics on top of a func_brush.
When the brush is disabled, either through code or though script (via a 
trigger), the physics object does not drop to the ground.

When I slightly push the prop_physics with another prop, it can get into a 
position where it will swing in the air from a corner on the model.

When I pick up the object and throw it through the disabled brush, it moves 
through it as intended.

The player moves through the brush in the correct manner (Colliding when 
enabled and moving through when disabled) in all cases. This includes when 
the player or NPC (Combine Solider) stands on top of the brush and falls 
through it correctly when it is disabled.

What am I missing here in the code?






___
To unsubscribe, edit your list preferences, or view the list archives, 
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Physics Problem

2006-07-25 Thread Justin Krenz

Thank you very much.  The whole "AngularImpulse" type was throwing me off.

Jay Stelly wrote:

GetVelocity returns a velocity.  It's already in degrees / second.
SetVelocity() takes the same units.  AngularImpulse is a vector type
that can contain an impulse, but here it's just used as a vector.



___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



RE: [hlcoders] Physics Problem

2006-07-25 Thread Jay Stelly
GetVelocity returns a velocity.  It's already in degrees / second.
SetVelocity() takes the same units.  AngularImpulse is a vector type
that can contain an impulse, but here it's just used as a vector.

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Justin Krenz
> Sent: Tuesday, July 25, 2006 9:02 PM
> To: hlcoders@list.valvesoftware.com
> Subject: [hlcoders] Physics Problem
>
> I have a physics object that I'm trying to retrieve its
> angular velocity in degrees/second.  Using GetVelocity(Vector
> * velocity, AngularImpulse
> * angularVelocity), it appears that I can retrieve the
> angular impulse of the angular velocity.  Getting this value,
> I multiply it by 180*pi to convert from radian to degrees,
> and then I divide by the object's mass.
>
> However, I compare this to the actual change in degrees that
> the model undergoes, and the values are different.  For
> example, if I use
> SetVelocity(...) to input an AngularImpulse of 100 for the x
> axis/pitch every frame, then convert to radians and divide by
> a mass of 2080, I get approximately 2.8.  However, if I
> sample the actual change in degrees of the object's pitch
> every frame, it comes out to approximately 19 degrees/second.
>
> What am I doing wrong, and how can I correctly calculate an
> object's change in angle in degrees/sec?
>
> ___
> To unsubscribe, edit your list preferences, or view the list
> archives, please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders