How to assign 1 animation to multiple objects - unity3d

I am trying to initiate the movement of two cars in Unity. There will be a variable time gap between the time points which the two cars start moving. But Unity lets me assign only one animation at a time which means that I can not move the second car while the first animation is running.
How do I achieve this?

Related

Unity-3D - Can I have several object show the same animation state?

An animated figure requires an Animator to have it show animation.
I am trying to create a batalion of soldiers walking in lockstep. Just creating 200 soldiers and moving them is easy, but each one has its own animator and is calculating the animation pose of the soldier in each frame - for each soldier.
But if they are all the same it would seem better to have one animator calculate the pose and use this shaped mesh for all of them.
Is there a way to have several gameobjects share one Animator, one Mesh, and one single copy of the resulting pose?
The screenshot attached shows that the 500 animators consume several milliseconds on 5 CPUs to do the animations...

Gradually decreasing the velocity of an object through animation in Unity

I need to create 2 animations,
one is of an object going from point A to point B at a constant velocity.
the other is of an object starting from point A but with a gradually decreasing velocity as it reaches point B until it comes to a stop.
I tried decreasing the animation speed every second to achieve this result with no luck.
Any ideas?
As you may have noticed when you work with animation in Unity there is no such thing as changing the velocity of an object. What you need to do is give your object an Animator and create a new Animation.
Then on the animation timeline press the red dot (record button) and then place your object on point A.
Next, on the time line you want to select the exact second that you want your object to come to a stop and after that move the object on point B.
Now, the more seconds there are in between the 2 keys, the more time it's going to take for the object to travel.
To make it gradually slower instead of it just travelling slowly:
On the animation panel you will see 2 tabs. Dopesheet and Curves. Hit Curves and play around with them till you have a satisfing result.
Documentation on using Curves

How to track multiple collisions between 2 sprites?

Here's an example, just for ease of understanding:
Sprite A is a ball. Sprite B is a cube. When the ball touches the cube once, I want the label to say first contact. When the same ball touches the same cube again, I want the label to say second contact. When the same ball , touches the same cube again, I want the label to say third contact.
How do I accomplish this?
It seems Sprite kit only allows 1 hit collisions between sprites to be programmed, which is enormously limited, in my opinion. Especially, since I want to create an enemy that actually changes behaviour dependant on the amount of hits it receives from the player, not just the same action for every collision.
Figured out a way. If you assign sprite A with points and use a cumulative score to keep track of the points you can then then use "score" as a collision counter. So each time sprite A touched Sprite B the score would increment by 10 points, simply then saying if score == 100 for example ... program something or if score == 150 ... program something (did begin method) and it worked, allowing you to program different actions or whatever at each point of collision with the same sprites! Awesome. Didn't think it would work but it did :)

SKSpriteNode moving along a vector

If an SKSpriteNode runs an SKAction telling it to move by a certain vector for a duration, will the SKSpriteNode still have momentum and keep moving once the action is complete? Also, if another action is called telling the node to move along a different vector while it is still moving by the first vector, will the node listen to only the second vector, only the first, or both? Thanks in advance!
SKActions and the physics are separate. The action will run and ignore all of the physics, and the previous vector. You should use applyForce if you want it to move by a certain amount.

How to measure the force by which Two rigid Bodies collide?

How to measure the force by which Two rigid Bodies collide and in the reaction add force to other object in opposite direction. For example in the cricket game how the force is measured b/w bat and ball . If player blocks it add a min force to the ball and if he plays the shot he ball goes too far for a four or a six. I will say that just simple addforce() component will not work. It will just apply the force every time when it hits the bat doesn't matter it is blocked or a shot played.