Search found 21 matches

by i7.strelok
Tue Jun 06, 2017 10:28 pm
Forum: General Bullet Physics Support and Feedback
Topic: How can I rotate a hard leather in place?
Replies: 0
Views: 1113

How can I rotate a hard leather in place?

When I move the mouse, I break my scene node and update my rigid body. Note: I am using a wrapper to facilitate Bullet and Ogre integration. Then I do myRigidBody-> setOrientation (newOrientation) and it works perfect but when I move the rigid body it does not move as it should, that means that when...
by i7.strelok
Sat Jun 03, 2017 4:30 pm
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: How to move a kinematic body?
Replies: 0
Views: 1813

How to move a kinematic body?

I try to develop my FPS-Game, I need to move the player, but if I use dynamic-body, I change its rotation too, I think that I need to use the kinematic-body, but ... how to move the kinematic body ? Or How to disable the other axes? void PlayState::createPlayer(){ Vector3 size = Vector3::ZERO; // si...
by i7.strelok
Tue May 30, 2017 10:03 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to move a character? FPS
Replies: 0
Views: 1188

How to move a character? FPS

I'm developing a mini-game for the University, he should use "bullet". It's an FPS and I need (for the moment) to move the main character, I guess the straight direction to the vector that looks at the camera.
How can I do that?
by i7.strelok
Wed May 10, 2017 4:13 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to disable collision with bodies?
Replies: 4
Views: 2280

Re: How to disable collision with bodies?

One of these lines deactivates or the other active?
by i7.strelok
Mon May 08, 2017 1:52 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to disable collision with bodies?
Replies: 4
Views: 2280

How to disable collision with bodies?

I have 4 rigid bodies, but I want to turn on and off your collision when I want, but I can not.
I'm using the OgreBullet wrapper, but it does not affect using pure code
I thought the line was "setActivationState" but it did not work.
by i7.strelok
Wed Apr 26, 2017 8:04 pm
Forum: General Bullet Physics Support and Feedback
Topic: First Person Shoot Game !! Basic Physics
Replies: 8
Views: 2351

Re: First Person Shoot Game !! Basic Physics

Sr. @drleviathan Maybe what I need is easier. Maybe I'm making my problem even more complicated. Please watch the video that is in Outlook, I am trying to make a basic FPS game, I have a machine to shoot, that machine has animations, I need to detect when it shoots and hits one of those 4 targets. I...
by i7.strelok
Wed Apr 26, 2017 5:11 pm
Forum: General Bullet Physics Support and Feedback
Topic: First Person Shoot Game !! Basic Physics
Replies: 8
Views: 2351

Re: First Person Shoot Game !! Basic Physics

Hi, I tried. Can you watch my video?: https://1drv.ms/f/s!ArGUObDbqeovhrlTduYarEGPEUb9Vw My full code is: void PlayState::createBullet(){ _contador++; string idBullet = static_cast<std::ostringstream*>(&(std::ostringstream() << _contador))->str(); Ogre::Entity* entBullet = _sceneMgr->createEntity("B...
by i7.strelok
Wed Apr 26, 2017 9:30 am
Forum: General Bullet Physics Support and Feedback
Topic: How to simule shoots from a weapon with Bullet+Ogre
Replies: 5
Views: 2008

Re: How to simule shoots from a weapon with Bullet+Ogre

Your weapon has local XYZ axes. I will assume it shoots along the local-Z axis. In order to shoot in the correct direction in the world-frame you need to figure out the direction your weapon's Z-axis points when transformed into the world-frame. Get the transform of your weapon in the world-frame a...
by i7.strelok
Wed Apr 26, 2017 9:25 am
Forum: General Bullet Physics Support and Feedback
Topic: First Person Shoot Game !! Basic Physics
Replies: 8
Views: 2351

Re: First Person Shoot Game !! Basic Physics

You mean this? btVector3 dirCam(_camera->getRealDirection().x, _camera->getRealDirection().y, _camera->getRealDirection().z); btVector3 shootDirection = dirCam * localZ; It does not work, the bullet moves much more in Y But, It is correct? MyMotionState* fallMotionState = new MyMotionState( btTransf...
by i7.strelok
Wed Apr 26, 2017 12:21 am
Forum: General Bullet Physics Support and Feedback
Topic: First Person Shoot Game !! Basic Physics
Replies: 8
Views: 2351

Re: First Person Shoot Game !! Basic Physics

Most of your code looks okay to me. If the bullet only shoots along Z-axis then my guess is: oriWeapon is not getting the values you expect. Print out the values of oriWeapon to verify that its values change with the mouse. By the way, I notice that you set the value of oriWeapon twice before you u...
by i7.strelok
Tue Apr 25, 2017 10:41 pm
Forum: General Bullet Physics Support and Feedback
Topic: First Person Shoot Game !! Basic Physics
Replies: 8
Views: 2351

First Person Shoot Game !! Basic Physics

Hi, I'm going to detail my situation so that someone can help me. First I want to clarify that I am using a translator because my English is not good. I'm using the Ogre3D rendering engine and I need to make use of Bullet Physics for my University project. The truth is that they have not taught us h...
by i7.strelok
Tue Apr 25, 2017 6:25 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to simule shoots from a weapon with Bullet+Ogre
Replies: 5
Views: 2008

Re: How to simule shoots from a weapon with Bullet+Ogre

I'm very noob in bullet, This is my full code: string idBullet = static_cast<std::ostringstream*>(&(std::ostringstream() << _contador))->str(); Ogre::Entity* entBullet = _sceneMgr->createEntity("Bullet"+idBullet+"Ent", "Circle.mesh"); Ogre::SceneNode* nodeBullet = _sceneMgr->getRootSceneNode()->crea...
by i7.strelok
Tue Apr 25, 2017 3:48 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to simule shoots from a weapon with Bullet+Ogre
Replies: 5
Views: 2008

Re: How to simule shoots from a weapon with Bullet+Ogre

So, if I add that line automatically adds a dynamic body? My weapon moves, how can I do to shoot correctly ?. Currently it moves only in Z, but I do not understand how to make it respect the rules of the real world. If I shoot at the sky, the bullet must move in both Y and Z, if I shoot only straigh...
by i7.strelok
Mon Apr 24, 2017 9:22 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to simule shoots from a weapon with Bullet+Ogre
Replies: 5
Views: 2008

How to simule shoots from a weapon with Bullet+Ogre

I need apply a impulse to my bullet object, but not works. void Physics::initObjects(){ collisionConfiguration = new btDefaultCollisionConfiguration(); dispatcher = new btCollisionDispatcher(collisionConfiguration); overlappingPairCache = new btDbvtBroadphase(); solver = new btSequentialImpulseConst...