Performing an Action continusley when Condition is true just once... .

Well… I got a solution for my problem so I just wanted to share it maybe it will help someone out…

So, here’s where I got stuck:

[24799-blocks.png |24799]

I wanted to add force to greenBox downwards. when the blue one under it, is clicked.
and then the force should be regard-less of Click on that bluebox…

I cannot add if statment it needs every time cilck on bluebox…

SO, what would I do???

P.S: Sharing the ans. below.

Here is what I did… First I added force in that greenbox’ script and OnStart set its “isKinematic” to true (assume it has rigidbody attached), So force will not effect it and then I added If statment :

If (bluebox(under greenbox) is clicked),then
set “isKinematic to false”;

So, now the force will effect the greenbox and it donot need to be clicked again.

Cheers :slight_smile: