Box2D Forums

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

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Tue Nov 04, 2008 6:50 am 
Offline

Joined: Mon Jan 07, 2008 10:51 am
Posts: 1911
One of the controllers released is b2TensorDampingController, which does a very similar form of wheel behaviour quite nicely. It's the 4th example in this demo. Note real wheels need some angular damping too.


Top
 Profile  
 
PostPosted: Tue Nov 04, 2008 6:51 am 
Offline

Joined: Wed Sep 10, 2008 8:03 am
Posts: 138
Tensor damping is what you need to the wheels. If you apply a tensor damper on all 4 wheels and then rotate the front wheels you get what you are looking for. Just as in real life, a wheel applies little resistance in the forward direction while applying loads in the sidewards direction.


Top
 Profile  
 
PostPosted: Sun Nov 16, 2008 9:10 am 
Offline

Joined: Tue Oct 14, 2008 1:30 pm
Posts: 65
CyberPunK wrote:
...i noticed the problems thack mack also noticed. The car seems to go faster at some angle and sometimes it steers faster then normal. I guess it has something to do with the killOrthogonalVelocity function, but i wasn't able to find out a solution.
It was caused by this bug.


Top
 Profile  
 
PostPosted: Mon Nov 17, 2008 1:39 pm 
Offline

Joined: Thu Apr 10, 2008 12:18 pm
Posts: 58
Cool! I want to play with your code but it won't compile. Which Box2D version you have used??


Top
 Profile  
 
PostPosted: Mon Nov 17, 2008 2:39 pm 
Offline

Joined: Fri May 16, 2008 2:52 pm
Posts: 280
I used Box2D Flash AS3 2.0.1, without any of the patches.


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 1:33 pm 
Offline

Joined: Mon Mar 03, 2008 4:38 pm
Posts: 127
Location: Scotland
Hi again everyone.

I downloaded Boris's Controller pack (cheers boris!) and i managed to get Tensor damping on a body but im not really sure what im doing with it to make it act like a "top down wheel". I basically want to use the keys to rotate it and the up key should apply some sort of force along the rotation....

I tried to use Andriods example code to see how to do this (without the Tensor Controller) but like the others, im struggling to get it working and so cant even replicate it with the source in front of me.

Seeing a search on this seems quite common, can anyone give me (and possibly future people) some advice?

Cheers!

Clark.


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 2:40 pm 
Offline

Joined: Tue Oct 14, 2008 1:30 pm
Posts: 65
clark, android's code works very well with latest svn fixes. although it claims to "kill orthogonal velocity", natural skidding occurs due to joints; but if you want additional "tensor" damping, simply modify killOrthogonalVelocity() to add small amount of targetBody.GetXForm().R.col1 in.


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 3:12 pm 
Offline

Joined: Mon Mar 03, 2008 4:38 pm
Posts: 127
Location: Scotland
I think thats where i am getting confused.

It has only been in the past 12 hours that i have noticed the getXForm() and i have no idea what the .r.col1 and .r.col2 is referring to.

Cheers,

Clark.


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 4:47 pm 
Offline

Joined: Tue Oct 14, 2008 1:30 pm
Posts: 65
apparently R is rotation matrix and colX are its columns, coincidentally forward and sideways directions (of the wheel). non-uniform aka "tensor" damping means different damping along these directions. in case of wheel, you would want little damping in forward direction and larger damping in sideways direction.


Top
 Profile  
 
PostPosted: Mon Jan 05, 2009 6:43 am 
Offline

Joined: Mon Jan 05, 2009 4:50 am
Posts: 2
ps.this is a sweet example. it wascoolof you to share.
i was trying to figure out box2d with the complexity of so many classes,so it's great you shared
it always alove hate relantionship with frameone as eh?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 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