Box2D Forums

It is currently Fri May 24, 2013 4:05 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu Jun 14, 2012 9:16 am 
Offline

Joined: Thu Jun 14, 2012 8:27 am
Posts: 1
What I have is the following:

1) A ball with physics enabled.

2) A polyline level

3) Physics/Collision detection works fine between those

What I want:

Swiping the ball by X amount in the X direction would move the ball by X amount in the X direction WHILE maintaining Y physics and collision physics. Which means that if you swipe the ball right 100 pixels, but after 50 pixels there is a wall, then the ball would just move 50 pixels to the right.

Another example: Say you want the ball to go up a hill to the right, you would swipe to the right and the ball's change in X position would equal to the finger's delta X. So the ball is going up the hill in X direction and also in Y due to the ball's reaction to the slope of the hill (3. physics/collision detection)

I have recently become aware of the TouchPanel drag gesture.Delta() function and making use of it but it doesn't feel right.

I would really appreciate help on this.

Thanks,
Tan.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot], Google [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group