Salival
Member
|
Bit combination (IndexToFlag)
Hey,
Got two questions:
1)
So the group parameter is a bit combination right ? if I only want two types to be checked in a ray test, lets say terrain and entities.
IndexToFlag = convert index to flag
UInt flag = IndexToFlag(Core::Groups::Entity) | IndexToFlag(Core::Groups::Terrain);
Physics.ray(..,...,..., flag)
or think I am completely wrong?, one group works but not two.
2)
Is it possible to apply impulse on ragdolls? Right now I must like apply impulse and enable ragdoll after a time period, lets say 100ms, else impulse gets ignored.
cheers.
(This post was last modified: 04-02-2012 09:53 AM by Salival.)
|
|
04-02-2012 09:35 AM |
|
Ogniok
Member
|
RE: Bit combination (IndexToFlag)
1) Shouldn't you use:
Code:
UInt flag = IndexToFlag(Core::Groups::Entity | Core::Groups::Terrain);
I may be wrong but I think that should work.
|
|
04-02-2012 02:46 PM |
|
Esenthel
Administrator
|
RE: Bit combination (IndexToFlag)
UInt flag = IndexToFlag(Core::Groups::Entity) | IndexToFlag(Core::Groups::Terrain);
this is ok, remember that only 0..31 groups are supported.
|
|
04-05-2012 03:10 AM |
|