3d Math problems

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

R0j5

New Member
Oct 26, 2003
3
0
0
I'm trying to get an actor's forward speed (acceleration) to put into either a float or int variable.
My trouble is in using the actors acceleration and using it's rotation to get the actors speed relative to the view location. Any help on how to do this?
 

Mr Evi1

New Member
Mar 22, 2002
336
0
0
UK
come.to
Daid303 said:
Actualy, you just want the length of the acceleration vector. ;)
That's all very well, as long as the actor is accelerating forwards. If for example it is accelerating at 45 degrees to the direction it is facing, the magnitude of the acceleration will not be the same as the forward acceleration. In that case you need to resolve the acceleration's forward component, something like this:
Code:
ForwardAcceleration = Acceleration Dot vector(rotation);
 

R0j5

New Member
Oct 26, 2003
3
0
0
Thanks, I knew it was going to be something easy too, I must have skimmed right over the VSize() while looking for the answer to this.
I have a nice looking 3rd person camera up and working now, thanks for the help.