Have object B sit under object A at all times?

12 views
Skip to first unread message

Nick

unread,
Mar 22, 2011, 10:38:57 AM3/22/11
to Physics2D.Net
Hi all,

I have been having a problem with having object “B” sit a given amount
under object “A” at all times.

Basically what I have is object A that moves around. What I need to do
is have object B sit directly under it regardless of A’s rotation etc
at all times. So if A is at 0,0 B is at 0, 100 for instance.

I have tried many things, the most successful being a hinge joint
however when applying movement or rotation to A be starts to spin
around A.

Any pointers in the right direction would be very much appreciated.

Thanks

YoG

unread,
May 7, 2011, 12:25:45 PM5/7/11
to Physics2D.Net
I also encountered a similar problem, I want to create "infinite"
floor - so I want a small block to follow my object right underneath
it... I don't know if that's the best solution, but what I did is
simply update the X position of the object using the positionchanged
event of the body...
Reply all
Reply to author
Forward
0 new messages