# contactStarted() in Fisica(python Mode) not worked

**URL:** <https://discourse.processing.org/t/contactstarted-in-fisica-python-mode-not-worked/15172>\
**Category:** Processing.py\
**Created:** [November 3, 2019, 8:16am UTC](https://discourse.processing.org/t/contactstarted-in-fisica-python-mode-not-worked/15172 "2019-11-03T08:16:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shitou](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/shitou/32/7220_2.png) [@Shitou](https://discourse.processing.org/u/Shitou)\
**Post date:** [November 3, 2019, 8:16am UTC](https://discourse.processing.org/t/contactstarted-in-fisica-python-mode-not-worked/15172/1 "2019-11-03T08:16:13Z")

</div>

The contactStarted() in my python code never be called, please tell me how to fix it.

```python
add_library('fisica')

from my_module import *
from random import random

def contactStarted(c):
    print("hello")
    b1 = c.getBody1()
    b2 = c.getBody2()
    if not b1.isStatic() and b1.getSize()>1:
        b1.setSize(b1.getSize()*2)
    if not b2.isStatic() and b2.getSize()>1:
        b2.setSize(b2.getSize()*0.9)
 
def setup():
    global world
    size(300, 300)
    Fisica.init(this)
    world = FWorld()
    world.setEdges()
    
    ball = FCircle(20)
    set_fbody(ball, pos=(200, 200))
    world.add(ball)
    
    
def draw():
    background(255)
    world.draw()
    world.step()
    
    
def mousePressed():
    ball = FCircle(10 + 20*random())
    ball.setFilterBits(1)
    set_fbody(ball, pos=(mouseX, mouseY), v=(150-300*random(), 150-300*random()), 
              rest=1, fill = (255-100 * random(), 100, 100))
    world.add(ball)
    

```

Thanks!

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [November 3, 2019, 11:01pm UTC](https://discourse.processing.org/t/contactstarted-in-fisica-python-mode-not-worked/15172/2 "2019-11-03T23:01:36Z")

</div>

> <https://github.com/rikrd/fisica/pull/1>

---

<div class="post-metadata">

**Author:** ![Shitou](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/shitou/32/7220_2.png) [@Shitou](https://discourse.processing.org/u/Shitou)\
**Post date:** [November 6, 2019, 2:25am UTC](https://discourse.processing.org/t/contactstarted-in-fisica-python-mode-not-worked/15172/3 "2019-11-06T02:25:49Z")

</div>

Thanks！ It really works！
