Change your position

How do I send the position 0,0,0 when the red object hits the other object.

Hey, you can achieve it by adding physics to both objects so that it can raise a particular event on Interaction which can be collider or trigger which is explained here(Collision and Triggers | Learn PlayCanvas).
Also You can study the type of event raised here CollisionComponent | PlayCanvas API Reference

this.entity.collision.on(“triggerenter”, this.onCollision. this)
Something.prototype.onCollision = function (target) {
if(target === redobject) {