Raised This Month: $401 Target: $400
 100% 

Solved Coordinates of the player's camera first person view


Post New Thread Reply   
 
Thread Tools Display Modes
tonline_kms65
Member
Join Date: Aug 2016
Location: Ru
Old 03-26-2020 , 22:21   Re: Coordinates of the player's camera first person view
Reply With Quote #11

Quote:
Originally Posted by Balimbanana View Post
Try this:
Code:
SetVariantString("!activator");
AcceptEntityInput(ent_camera,"SetParent",client);
SetVariantString("eyes");
AcceptEntityInput(ent_camera,"SetParentAttachment");
Not all player models have an " eye " attachment, so this option is not allowed. I have already written about this. In addition, when the player model moves, the attachment will also move, this is also unacceptable.

Last edited by tonline_kms65; 03-26-2020 at 22:24.
tonline_kms65 is offline
tonline_kms65
Member
Join Date: Aug 2016
Location: Ru
Old 03-26-2020 , 23:06   Re: Coordinates of the player's camera first person view
Reply With Quote #12

Here's what I found!
I made a demo using source_tv to get a side view, that's what I got:

If the view is from the first person
https://forums.alliedmods.net/attach...1&d=1585277667
Correct location of the camera, repeating the animation, but the center of the point for attaching the camera is shifted to the feet of the 3D model of the player.
There is an error in the camera movement when the player looks up or down.

If the view is from a third person(from the side)
https://forums.alliedmods.net/attach...1&d=1585277687
Incorrect location of the camera(behind the 3D model of the player), the animation of the player's movement (left-right/up-down view) is not repeated at all.

The player's entity consists of 2 connected 3D models:
- One v_model (first-person view).
- The other is the view of the model from the side.
Obviously, I attach the camera to the player's model with a 3-person view (side view).
Attached Images
File Type: jpg ent_cam.jpg (68.8 KB, 7 views)
File Type: jpg ent_cam01.jpg (61.3 KB, 7 views)

Last edited by tonline_kms65; 03-26-2020 at 23:33.
tonline_kms65 is offline
tonline_kms65
Member
Join Date: Aug 2016
Location: Ru
Old 03-26-2020 , 23:21   Re: Coordinates of the player's camera first person view
Reply With Quote #13

Quote:
Originally Posted by Bacardi View Post
If you are teleporting too soon on player while he spawn for example ?

First the player is born, much later I attach the camera.

What I need it for, video(slightly off topic)
Video https://youtu.be/eYOhtOlOeBg
Last https://youtu.be/cFzCNxhfwjU

Last edited by tonline_kms65; 03-27-2020 at 01:02.
tonline_kms65 is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 03-27-2020 , 08:16   Re: Coordinates of the player's camera first person view
Reply With Quote #14

Quote:
Not all player models have an " eye " attachment, so this option is not allowed. I have already written about this. In addition, when the player model moves, the attachment will also move, this is also unacceptable.
Assuming the game is CSGO the attachmentpoint is "facemask" and should absolutly do what you want.....
Attached Images
File Type: jpg facemask.jpg (27.0 KB, 5 views)
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
tonline_kms65
Member
Join Date: Aug 2016
Location: Ru
Old 03-27-2020 , 09:40   Re: Coordinates of the player's camera first person view
Reply With Quote #15

Quote:
Originally Posted by andi67 View Post
Assuming the game is CSGO the attachmentpoint is "facemask" and should absolutly do what you want.....
I'm sorry, I forgot to say, the Counter-Strike engine:Source
tonline_kms65 is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 03-27-2020 , 10:13   Re: Coordinates of the player's camera first person view
Reply With Quote #16

than use "forward" attachmentpoint.....
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
tonline_kms65
Member
Join Date: Aug 2016
Location: Ru
Old 03-27-2020 , 18:24   Re: Coordinates of the player's camera first person view
Reply With Quote #17

I have taken an alternative path so far. Just like I did in my plugins "Drone", "RCDroneHeli".
The camera was set to the coordinates of the player's eye, and the camera's view control was made dependent on the player's view.
Code to control the camera in "OnPlayerRunCmd"

It's decided!
Rechecked and tested. Everything works perfectly, which is what I wanted to achieve.

Last edited by tonline_kms65; Yesterday at 00:38.
tonline_kms65 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 04:48.


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