# Physics based halfpipe question

**URL:** <https://forum.kirupa.com/t/physics-based-halfpipe-question/199706>\
**Category:** Uncategorized\
**Created:** [September 5, 2006, 11:58am UTC](https://forum.kirupa.com/t/physics-based-halfpipe-question/199706 "2006-09-05T11:58:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![slideth3](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@slideth3](https://forum.kirupa.com/u/slideth3)\
**Post date:** [September 5, 2006, 11:58am UTC](https://forum.kirupa.com/t/physics-based-halfpipe-question/199706/1 "2006-09-05T11:58:48Z")

</div>

hey everyone,

been making a physics based halfpipe

[http://www.kitegallery.net/misc/Slideth/Sam/halfpipe+real+physics.swf.html](http://www.kitegallery.net/misc/Slideth/Sam/halfpipe+real+physics.swf.html)

anyway the problem is that one of the wheels reacts to the halfpipe perfectly but the one that is connected to it doesn’t, because of the way i have made them stick together with a set distance.

Is there anyway ik style where i could make the both stick to each other and react to the outside perfectly.

along the lines of those motorbike games… eg at teagames

```auto

dx = this._x - _root.ball2._x
	dy = this._y - _root.ball2._y
	d = 50
	a = Math.atan2(dy, dx);
	_root.ball2._x = this._x - Math.cos(a)*d
	_root.ball2._y = this._y - Math.sin(a)*d

```

see all i’m doing at the moment is attaching the second ball to the first and not the other way arround,

is there any way of doing both so to speak! lol

thaaaanks
