[ H3LP ] Rotate angle vector
Hello, I want to set view angle in player relative to wall angle. I tried with GL_trace_plane_normal, it's working but not as an I want. I want to aim in wall direction, not in oposite direction of wall. How I can rotate this vector to opositional direction?
Code:
|
Re: [ H3LP ] Rotate angle vector
Basically what I need is to rotate the yaw (vAngles[1]). So if the wall is located at 90 °, the aim is being set to 270 °, I want to set the aim in 90 °.
Code:
Wall | Aim | Aim that I wantSorry for bump. |
Re: [ H3LP ] Rotate angle vector
PHP Code:
If i am wrong can you explain more of what are you doing? |
Re: [ H3LP ] Rotate angle vector
I'm trying to make a wall climb with "stuck". So basically, the player don't need to keep pressing IN_USE to climb. That's already working, but I need to EV_INT_fixangle/pev_fixangle in the player in the wall direction, so I don't need trace, only the plane.
So if I climb the wall that is in my front, the camera should keep aiming in this wall.
Spoiler
But what's really happening is the camera is being set to backward.
Spoiler
I hope you understand. If not I can show the code or enable the plugin in a test server. |
Re: [ H3LP ] Rotate angle vector
So it's always the opposite? Then just negate the direction vector before converting to angles.
Code:
xs_vec_neg(vPlane, vPlane); |
Re: [ H3LP ] Rotate angle vector
Works just fine, thanks.
|
| All times are GMT -4. The time now is 12:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.