Simple question

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Chrasher

The brabbeling raaskallen dude....
Nov 3, 2000
23
0
0
www.altavistase(For sure)
I know you shouldnt asked this type of questions, but I really sux on vector math so thought it might be best to ask to get it straight.

The velocity of a controller rotation is that Vsize(vector(GetViewRotation()) ?
 

Mr Evi1

New Member
Mar 22, 2002
336
0
0
UK
come.to
Chrasher said:
Yeah, noticed that :)

Anyone have a idea how you get a playercontrollers rotation velocity then?
Perhaps you mean rotation rate? If so, there is no way to calculate it from a single variable like that. You need to compare the current rotation to the rotation last tick.
 

Chrasher

The brabbeling raaskallen dude....
Nov 3, 2000
23
0
0
www.altavistase(For sure)
Mr Evi1 said:
Perhaps you mean rotation rate? If so, there is no way to calculate it from a single variable like that. You need to compare the current rotation to the rotation last tick.

Yeah, guess you can say that too. Trying to makeing a fluid weapon moment like in Call of Duty if you have played that. So the weapon lower little itself depending on pawn the velocity:

Code:
Speed2D = VSize(Velocity);		
if(!bIsAiming && !PlayerController(Controller).bPressedJump)
{
	FluidValue = (1.0 - ((Speed2D/8)/WalkingGroundSpeed));
	DrawOffset.Z = DrawOffset.Z * FluidValue;
	Inv.PlayerViewPivot.Pitch += 2500 - FluidValue * 2500;
}

And the weapon should fluid "wobble" after the direction the player move the mouse. The size of the "wobble" should depend on how fast the mouse is moved at one direction. Guess the best way should be to check that in PlayerInput but is useing CalcDrawOffset in a pawn so is trying to solve it from there.
 
Last edited: