What I basically need is an absolute value type function for a vector. Not true abs, but something that does the same thing:
I have some actor, which is facing some direction. If you shoot the actor from the side, the momentum conitues along through the side. If you shoot from the back, the momentum, again, doesn't change and carries through the back to the front. If you shoot the actor from the back-side, again, nothing happens to it.
BUT, if you shoot the actor from the front, I want the inverse of the vector. If you shoot the actor from the front-side, you get the momentum as if it where shot from the back through the same side.
I've been wracking my brains, and all the documentation on uscript vector functions, and haven't been able to come up with anything that works. So once more, I plead to the local math-gods for some much-needed help. Thanks!
[The question of offset was solved using a creative take on the GetAxes function; not sure if it was proper, but it worked. This abs thing is still an issue through ]
I have some actor, which is facing some direction. If you shoot the actor from the side, the momentum conitues along through the side. If you shoot from the back, the momentum, again, doesn't change and carries through the back to the front. If you shoot the actor from the back-side, again, nothing happens to it.
BUT, if you shoot the actor from the front, I want the inverse of the vector. If you shoot the actor from the front-side, you get the momentum as if it where shot from the back through the same side.
I've been wracking my brains, and all the documentation on uscript vector functions, and haven't been able to come up with anything that works. So once more, I plead to the local math-gods for some much-needed help. Thanks!
[The question of offset was solved using a creative take on the GetAxes function; not sure if it was proper, but it worked. This abs thing is still an issue through ]
Last edited: