AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player (https://forums.alliedmods.net/showthread.php?t=318228)

Virginia 08-20-2019 15:31

[CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
 
I'm trying to make a demonstrational emotes plugin for CS:GO. It creates prop_dynamic with custom animset, bonemerge and parent it with player and plays an animation.

This is how it normally works - https://www.youtube.com/watch?v=Zz9f2QpOdNM. I host the server and i always see it like this. But some other players who join my server have a bug with their camera in thirdperson view. They always see it like this - https://gyazo.com/58dc86c86a5656e4be9bbb27aad4722a. Their camera stuck somewhere near their head position. 3 out of 5 players had this bug and 2 out of 5 (inclding me, the host) didn't.
Does anyone know how to fix this?

Halt 08-20-2019 15:42

Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
 
Neat idea man :up: I don't have the answer right now (although someone does) I can help later in the day when I return to my home where all my plugins are to browse through. DM me if you haven't gotten an answer by then and we can try and figure it out together.

Edit

Perhaps a simple test/debug can help us find out why some players have a different experience. Also not sure what's going on in the round but remember in Csgo when all CT's die and the camera defaults to the planted bomb, OR I believe the direction of the enemy that killed you.

GetRektByNoob 08-20-2019 16:34

Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
 
sorry, I can't help but can you release it when you're finished by any chance?. I would love to take a look at the code and its hilarious... :)

Virginia 08-20-2019 19:44

Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
 
We tested it for both teams, Ts and CTs, in the beginning of the round, with 1 player on the server and with few players, and always only me and one other player have normal camera.

Virginia 08-20-2019 19:46

Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
 
Quote:

Originally Posted by GetRektByNoob (Post 2664015)
sorry, I can't help but can you release it when you're finished by any chance?. I would love to take a look at the code and its hilarious... :)

Yes, i will release this demo plugin when it will be finished.

8guawong 08-20-2019 19:59

Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
 
https://forums.alliedmods.net/showthread.php?p=2661335

Maybe this will help

backwards 08-20-2019 20:25

Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
 
Do you have collision group set to be disabled on the dynamic prop? Also you can use this https://sm.alliedmods.net/new-api/sd...ientViewEntity spawn anothe prop which is parented to the player at an offset and set the clients view to be on that model. The issue appears to be the camera not wanting to clip through walls/objects and the prop dynamic having collision for the camera directly behind the players head. So it gets stuck and wont move back anymore

Halt 08-21-2019 13:58

Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
 
Quote:

Originally Posted by 1337norway (Post 2664040)
Do you have collision group set to be disabled on the dynamic prop? Also you can use this https://sm.alliedmods.net/new-api/sd...ientViewEntity spawn anothe prop which is parented to the player at an offset and set the clients view to be on that model. The issue appears to be the camera not wanting to clip through walls/objects and the prop dynamic having collision for the camera directly behind the players head. So it gets stuck and wont move back anymore

Yes, insure your entity has no collision. You can set a spawn flag (256) for no collision. Or also

PHP Code:

AcceptEntityInput(prop"DisableCollision""1"); 

For an easy fix.

Edit - You can test this by standing up against a solid brush and do multiple emotes, changing your angle each time. Example look at the solid brush first and do it, then turn 30 degrees and repeat until you do a full circle. Keep in mind overhead props/brush's and even some non-visible brush's. Playerclips etc. Nodraws should be fine because they don't render solid by default.

Virginia 08-21-2019 15:42

Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
 
I disabled collision, but it didn't help:
Code:

DispatchKeyValue(prop, "solid", "0");
SetEntProp(prop, Prop_Data, "m_nSolidType", 0 );
SetEntProp(prop, Prop_Data, "m_CollisionGroup", 0);
SetEntProp(prop, Prop_Data, "m_usSolidFlags", 256);
AcceptEntityInput(prop, "DisableCollision");

I also tried to make new prop with collision disabled, teleport it to the player position and set player view from this prop, and even this didn't help. (It was fine for me, but 2nd player still had broken camera.) Now i'm not even sure, may be there is something wrong with this player or my server.
I know a person who has similar plugin without such camera issue, so i think i will just wait for him and ask.

Mitchell 08-21-2019 20:17

Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
 
Maybe don't do the thirdperson command and use the other method that uses observer mode or whatever?


All times are GMT -4. The time now is 10:53.

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