Hello, I’m coding a system where a ball gets launched in the air. The way I am doing it is giving the ball a vector for assemblylinearvelocity, which is working just fine. I was wondering however if there was a way to show, in math, what this is doing or how far it’s going? Basically I would like to know what is going behind the scenes, so If I launched the ball 100+ Y and 100+ Z, what kind of velocity is this equal to? Is it headed somewhere?
AssemblyLinearVelocity is a vector that describes the speed and direction that a part is moving at in the form (x,y,z)
X is sideways, Z is forward, and Y is upward
The velocity (3,5,0) means that the part is moving 3 studs in the X direction and 5 studs in the Y direction every second
Through some research I found this on the roblox documentation for Assembly’s.
"
The linear velocity vector of the part’s assembly. Setting the velocity directly may lead to unrealistic motion, so usage of a VectorForce or LinearVelocity constraint is preferred, or BasePart:ApplyImpulse() for an instantaneous change in linear velocity.
"
So you would think that using one of those two instances on an object would work best, however I also found this on the vector force documentation page
"
If you only need initial velocity, set the AssemblyLinearVelocity property directly on the assembly.
"
So the problem is still not quite resolved here. and as for @happya_x’s response, I understand the idea of vectors etc, but when I launch the ball 3 studs in the x direction it doesn’t just move 3 studs. it will just kind of push the ball, but I’m not sure what exactly the math is behind this, I would really like to know because it’s pretty important that I know how far I will be launching the ball.
If you want to move something exactly 3 studs then its probably best to use the linear velocity
A linear velocity of (0,0,1) applied for 3 seconds will move exactly 3 studs in the z direction
You could also calculate distance from initial velocity using kinematics