Raised This Month: $51 Target: $400
 12% 

Solved "Bouncing" Props


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode