I'm simply trying to create a prop which acts like a bouncy ball. I know it's possible to simulate bouncing as I've done it before but can't for the life of me remember what I did.
I've tried "prop_physics" with no success and now I'm trying "prop_physics_multiplayer" but I can't even get the prop to appear... I imagine the souce engine has something which can do what I need but I just need some guidance since I'm not very versed with props. Thanks
PHP Code:
int Prop = CreateEntityByName("prop_physics_multiplayer");
if(IsValidEntity(Prop))
{
PrintToChatAll("Poo");
float vAngles[3], vEyePos[3], vEndPos[3];
GetClientEyePosition(Client, vEyePos);
GetClientEyeAngles(Client, vAngles);
Handle trace = TR_TraceRayFilterEx(vEyePos, vAngles, MASK_SHOT, RayType_Infinite, TraceFilterAllEntities, Client);
TR_GetEndPosition(vEndPos, trace);
delete trace;
DispatchKeyValue(Prop, "model", "models/props/cs_italy/orange.mdl");
DispatchKeyValue(Prop, "phyicsmode", "2");
DispatchKeyValue(Prop, "massScale", "1.0");
DispatchSpawn(Prop);
//SetEntityMoveType(Prop, MOVETYPE_FLY);
vEndPos[2] += 20.0;
TeleportEntity(Prop, vEndPos, NULL_VECTOR, NULL_VECTOR);
}