# Physics Simulation Forum

 All times are UTC

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Author Message
 Posted: Fri May 11, 2012 4:21 pm

Joined: Fri May 11, 2012 4:13 pm
Posts: 2
If I have an object with a linear factor of (0,0,0) and an angular factor of (1,1,1), I'd expect an impulse applied to this object to cause it to rotate (unless the impulse is aimed directly at the objects centre of mass).
But the impulse is scaled by the linear factor before being appllied as a torque impulse, which means that the object currently fails to rotate.

I have locally fixed this by going into this function:
btRigidBody::applyImpulse
And changing this line:
applyTorqueImpulse(rel_pos.cross(impulse*m_linearFactor));
To this:
applyTorqueImpulse(rel_pos.cross(impulse));

I'd be interested in knowing if this is indeed a bug, or I am misunderstanding the meaning of the m_linearFactor variable.
Thanks!

Top

 Posted: Sat May 12, 2012 6:02 am

Joined: Tue Mar 16, 2010 1:42 am
Posts: 57
It does look like the code is a bit confused about whether the linear factor is a scale factor that is applied to the forces/impulses acting on the body, or only on that part that induces a linear motion.

Usually the linear factor isn't changed from its default of (1,1,1), in which case it isn't an issue. To prevent a body from moving linearly a constraint would be used instead, which has the advantage of preserving the energy of the system (unlike scaling the forces to 0).

---JvdL---

Top

 Posted: Mon May 14, 2012 8:50 am

Joined: Fri May 11, 2012 4:13 pm
Posts: 2
Thanks for the reply
For my purposes, I'm not worried about a loss of energy if it gives me higher stability and performance than using a constraint (and less code to write!).
It sounds like it's probably just a bit buggy (or inconsistent) due to being rarely used.

Top

 Posted: Tue May 15, 2012 3:33 am

Joined: Thu May 10, 2012 4:51 am
Posts: 3
Location: sfbay
You should file a bug on http://code.google.com/p/bullet/issues/list

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 4 posts ]

 All times are UTC

#### Who is online

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

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

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities