AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   sentry model weird issue (prop_physics_~) (https://forums.alliedmods.net/showthread.php?t=303764)

Starbish 12-20-2017 11:25

sentry model weird issue (prop_physics_~)
 
video : https://youtu.be/k5s9mAqSy8E

I have a very weird issue. As you can see from video, it has weird physics.. it has no collide. i tried prop_physics_multiplayer and was not a solution too

I dont understand why it happens. it's from TF2 file itself and i tested this in CS:S, CS:GO too.

Same thing happens on those games too.

Any ideas would be appreciated.

Thank you.


Code
PHP Code:

int sentry CreateEntityByName("prop_physics_override");
        
DispatchKeyValue(sentry"model"TURRET_MODEL_PATH);
//        DispatchKeyValue(sentry, "spawnflags", "3");
        
DispatchKeyValueVector(sentry"origin"vecPointPos);
        
DispatchKeyValueVector(sentry"angles"vecUserAngle);
//        ActivateEntity(sentry);
//        AcceptEntityInput(sentry, "EnableMotion");

        
DispatchSpawn(sentry); 


neatek 12-20-2017 13:17

Re: sentry model weird issue (prop_physics_~)
 
Just do not set this:
PHP Code:

DispatchKeyValueVector(sentry"angles"vecUserAngle);
DispatchKeyValueVector(sentry"origin"vecPointPos); 

Use:
PHP Code:

TeleportEntity(sentryvecPointPosNULL_VECTORNULL_VECTOR); 

after DispatchSpawn(sentry);

Mitchell 12-20-2017 14:27

Re: sentry model weird issue (prop_physics_~)
 
Quote:

Originally Posted by neatek (Post 2567304)
Just do not set this:
PHP Code:

DispatchKeyValueVector(sentry"angles"vecUserAngle);
DispatchKeyValueVector(sentry"origin"vecPointPos); 

Use:
PHP Code:

TeleportEntity(sentryvecPointPosNULL_VECTORNULL_VECTOR); 

after DispatchSpawn(sentry);

That's not the issue, it's because he's spawning it as a prop_physics_override, and the sentry model doesn't have a collision box like normal physics props.

Starbish 12-20-2017 18:49

Re: sentry model weird issue (prop_physics_~)
 
Quote:

Originally Posted by Mitchell (Post 2567329)
That's not the issue, it's because he's spawning it as a prop_physics_override, and the sentry model doesn't have a collision box like normal physics props.

then how does it have a collision in tf2 original sentry? can i use this model if i add a collision box on prop_physics?

Mitchell 12-20-2017 19:06

Re: sentry model weird issue (prop_physics_~)
 
Quote:

Originally Posted by Starbish (Post 2567371)
then how does it have a collision in tf2 original sentry? can i use this model if i add a collision box on prop_physics?

It probably uses the bounding box for the collision.

Starbish 12-20-2017 19:18

Re: sentry model weird issue (prop_physics_~)
 
Quote:

Originally Posted by Mitchell (Post 2567373)
It probably uses the bounding box for the collision.

i added this right below the TeleportEntity() and nothing changed

new Float:minbounds[3] = {-200.0, -200.0, 0.0};
new Float:maxbounds[3] = {200.0, 200.0, 32.0};

SetEntPropVector(sentry, Prop_Send, "m_vecMins", minbounds);
SetEntPropVector(sentry, Prop_Send, "m_vecMaxs", maxbounds);

tonline_kms65 12-21-2017 00:03

Re: sentry model weird issue (prop_physics_~)
 
2 Attachment(s)
Try to create this model HitBox. In the physical model PhisBox doesn't work or works poorly.

tonline_kms65 12-21-2017 00:05

Re: sentry model weird issue (prop_physics_~)
 
Quote:

Originally Posted by Starbish (Post 2567374)
i added this right below the TeleportEntity() and nothing changed

new Float:minbounds[3] = {-200.0, -200.0, 0.0};
new Float:maxbounds[3] = {200.0, 200.0, 32.0};

SetEntPropVector(sentry, Prop_Send, "m_vecMins", minbounds);
SetEntPropVector(sentry, Prop_Send, "m_vecMaxs", maxbounds);


It worked in cs1.6(Pawn)


All times are GMT -4. The time now is 02:25.

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