[Sidefx-houdini-list] POPs: pstate values

Rangi Sutton rangi at kanuka.com.au
Sun May 15 05:26:17 EDT 2011


Hey Alvin,

pstate is a bitfield, so each bit in a binary number is set for to flag
different on/off states. The bit with value of 8 (4th) is set when it's just
hit. The frame after, that bit is set back to zero, so looking at it in
decimal it appears to drop by 8. Other bits represent different states,
"stopped" looks like it's the bit with value 4. So just hit and stopped, is

00000100 + 00001000 = 0001100 , 4 + 8 = 12

next frame it's still "stopped", but no long "just hit"

00000100 + 00000000 = 00000100, 4 + 0 = 4

You can do bitwise masking to discover if individual bits are set... somehow
;)

r.


On 14 May 2011 09:24, Alvin Yap <alvinyapvfx at gmail.com> wrote:

> Hi all!
> I am doing some "stick on collision" tests with POPs, but the pstate values
> do not seem to match up with the "Inspecting Attribues" help card. Here are
> some examples:
>
> "Stick On Collision" behavior, and just hit
> pstate = 24
> one frame after, pstate = 16.
>
> "Stop On Collision"
> on collide, pstate = 12
> one frame after, pstate = 4
>
> "Slide On Collision"
> on collide, pstate = 32776 (!!!!)
> one frame after, pstate = 32768
>
> "Bounce On Collision"
> on collide, pstate = 8
> on frame after, pstate = 0
>
> It seems like the Just Hit attribute value of 8 matches the helpcard, but
> the rest do not seem to match.
>
> Am I missing something? This is on Houdini 11.0.733 Apprentice.
>
> Regards,
> Alvin
>



More information about the Sidefx-houdini-list mailing list