Help about BEPUphysicsDemos.

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
seaward
Posts: 2
Joined: Thu Aug 11, 2011 11:47 am

Help about BEPUphysicsDemos.

Post by seaward »

Hello all. We trying to use BEPU for our game. I have one problem and one question and I ask the help.

Problem. I added a new class _Class1 in the BEPUphysicsDemos for experiments. BEPUphysicsDemos has render and and a lot of code examples. It is convenient. I have created Update() function like press key controller.

Code: Select all

#if WINDOWS
        //ship controller
        public void Update(KeyboardState keyboardInput)
        {
            if (keyboardInput.IsKeyDown(Keys.W))
            {
               ...................
            }
        }
#endif
I have placed an update call in the DemosGame class.

Code: Select all

            
    public class DemosGame : Game
    {
        public Camera Camera;
        public _Class1 ShipClass;

...................
...................
...................

            #region Camera

            //Update the camera
#if !WINDOWS

            Camera.Update(dt, KeyboardInput, GamePadInput);
#else
            Camera.Update(dt, KeyboardInput, MouseInput, GamePadInput);
#endif

            #endregion

            #region ShipClass
#if WINDOWS
            ShipClass.Update(KeyboardInput);   //update ship controller
#endif
            #endregion
Project compilation is executed without errors, but the project hangs on loading. If this code string will comment
//ShipClass.Update(KeyboardInput); //update ship controller
then project will run successfully. Please, help me!!!!

Question. What it's possible to use for giving to my unit of constant force? I try to use class Thruster. What else?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Help about BEPUphysicsDemos.

Post by Norbo »

Project compilation is executed without errors, but the project hangs on loading. If this code string will comment
//ShipClass.Update(KeyboardInput); //update ship controller
then project will run successfully. Please, help me!!!!
That implies something in the ShipClass.Update method is hanging the system. Put a breakpoint in, run in debug mode, and step through it to get a better idea of what is going on.
What it's possible to use for giving to my unit of constant force? I try to use class Thruster. What else?
You can add to the entity's LinearVelocity/AngularVelocity/LinearMomentum/AngularMomentum properties. If you have an impulse that you want to apply at a certain world space location, you can also use the entity's ApplyImpulse method. Using ApplyImpulse applies both a linear and angular change appropriate for the impulse position. Thrusters use this internally.
seaward
Posts: 2
Joined: Thu Aug 11, 2011 11:47 am

Re: Help about BEPUphysicsDemos.

Post by seaward »

Thank you very mach! That's all right.

Just one question else. I can't open .chm documentation file BEPUphysicsv0.16.1API.chm from Win7. Do you have any format of documentation?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Help about BEPUphysicsDemos.

Post by Norbo »

That's probably caused by Windows blocking the .chm file. Try right clicking on it, going to properties, and clicking "Unblock" near the bottom.
Post Reply