Thread: [Solved] "Bouncing" Props
View Single Post
Author Message
Chrissy
Member
Join Date: May 2013
Old 06-07-2020 , 16:45   "Bouncing" Props
Reply With Quote #1

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(ClientvEyePos);
        
GetClientEyeAngles(ClientvAngles);

        
Handle trace TR_TraceRayFilterEx(vEyePosvAnglesMASK_SHOTRayType_InfiniteTraceFilterAllEntitiesClient);

        
TR_GetEndPosition(vEndPostrace);

        
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(PropvEndPosNULL_VECTORNULL_VECTOR);
    } 

Last edited by Chrissy; 06-14-2020 at 06:52. Reason: Solved
Chrissy is offline