# Physics Simulation Forum

 All times are UTC

 Page 1 of 1 [ 6 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Top-down object movementPosted: Sun Oct 14, 2012 7:10 am

Joined: Fri Sep 14, 2012 3:14 am
Posts: 6
If I was looking at a btRigidBody from top down and I wanted to have the movement be so that when I press forward it will always go in its forward direction, even after I turn it, how would I apply forward movement and rotation?

For direction it appears that I would use applyCentralForce, what what force? Is there a way to apply the forward direction as a force?
For rotation would it be as simple as just rotating the transform?

Top

 Post subject: Re: Top-down object movementPosted: Fri Oct 19, 2012 6:47 am

Joined: Fri Sep 14, 2012 3:14 am
Posts: 6
Am I missing any information that may provide assistance with my question?

Top

 Post subject: Re: Top-down object movementPosted: Thu Oct 25, 2012 6:03 am

Joined: Fri Sep 14, 2012 3:14 am
Posts: 6
Is there anyone that could help me with this?

Top

 Post subject: Re: Top-down object movementPosted: Thu Oct 25, 2012 6:14 am

Joined: Thu Oct 25, 2012 6:12 am
Posts: 1

Top

 Post subject: Re: Top-down object movementPosted: Thu Oct 25, 2012 6:25 am

Joined: Fri Sep 14, 2012 3:14 am
Posts: 6
harrybro wrote:

With my original question, or if my original question is missing information, why information is it missing?

Top

 Post subject: Re: Top-down object movementPosted: Fri Oct 26, 2012 4:37 pm

Joined: Sun Jun 26, 2005 6:43 pm
Posts: 3923
Location: California, USA
The 'forward' direction you refer to is likely one of the local principal axis, such as the X, Y or Z axis.

You can use btVector3 localXdir = rigidbody->getWorldTransform().getBasis().getColumn(0); to get the local x axis,
use 1 or 2 for Y and Z.

Attached is a simple BasicDemo replacement, just unzip and copy the files over the existing demo in Bullet/Demos/BasicDemo and use the cursor keys to move around.
The sample is too simple to be practical, but it gives you an idea about movement.

Thanks,
Erwin

Top

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

 All times are UTC

#### Who is online

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