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

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Virginia
Member
Join Date: Aug 2015
Old 08-20-2019 , 15:31   [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
Reply With Quote #1

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?

Last edited by Virginia; 09-30-2020 at 21:17.
Virginia is offline
Halt
Senior Member
Join Date: Jan 2015
Location: Black Mesa
Old 08-20-2019 , 15:42   Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
Reply With Quote #2

Neat idea man 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.

Last edited by Halt; 08-20-2019 at 15:45.
Halt is offline
GetRektByNoob
Member
Join Date: Nov 2018
Old 08-20-2019 , 16:34   Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
Reply With Quote #3

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...

Last edited by GetRektByNoob; 08-20-2019 at 16:36.
GetRektByNoob is offline
Virginia
Member
Join Date: Aug 2015
Old 08-20-2019 , 19:44   Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
Reply With Quote #4

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 is offline
Virginia
Member
Join Date: Aug 2015
Old 08-20-2019 , 19:46   Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
Reply With Quote #5

Quote:
Originally Posted by GetRektByNoob View Post
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.
Virginia is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 08-20-2019 , 19:59   Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
Reply With Quote #6

https://forums.alliedmods.net/showthread.php?p=2661335

Maybe this will help
__________________

Last edited by 8guawong; 08-20-2019 at 20:00.
8guawong is offline
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 08-20-2019 , 20:25   Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
Reply With Quote #7

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
__________________
I highly recommend joining the SourceMod Discord Server for real time support.
backwards is offline
Halt
Senior Member
Join Date: Jan 2015
Location: Black Mesa
Old 08-21-2019 , 13:58   Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
Reply With Quote #8

Quote:
Originally Posted by 1337norway View Post
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.

Last edited by Halt; 08-21-2019 at 14:02.
Halt is offline
Virginia
Member
Join Date: Aug 2015
Old 08-21-2019 , 15:42   Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
Reply With Quote #9

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.
Virginia is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-21-2019 , 20:17   Re: [CS:GO] thirdperson camera bug when bonemerging prop_dynamic with player
Reply With Quote #10

Maybe don't do the thirdperson command and use the other method that uses observer mode or whatever?
Mitchell is offline
Reply


Thread Tools
Display Modes

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 21:18.


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