Search Results

Search found 3931 results on 158 pages for 'roulette wheel selection'.

Page 31/158 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • WinForms - DateTimePicker default month selection behavior for Server 2003 vs Server 2008?

    - by Mike Loux
    Good Afternoon! Has anybody else noticed a change in the default behavior of the "next" and "previous" month arrows in the standard WinForms DateTimePicker control? I have users running on both Windows Server 2003 and Windows Server 2008 R2, and they are reporting that on 2008 (and Vista/Win7), clicking the right or left arrows on the drop-down Calendar now selects the first day of the month rather than retaining the same day like 2003 (and XP) does. I have checked this out (I have a Win7 machine) and I have confirmed this behavior. I would prefer that the behavior remain consistent whenever possible. Does anybody know what causes this and if there is a way to get around this? Is there a way to trap the arrow-click event and force the resulting date to retain the original day rather than be reset to the first of the month? I thought about seeing if there was a way to hit-test the control on a MouseUp event and determine if the arrow buttons were clicked, and then override the month value being set, but I'm not sure if that is even possible. Can anybody provide some wisdom or insight? Thanks!

    Read the article

  • word automation problem

    - by daemonkid
    I am trying open a word document for manipulation. However in the code below 'wordApp.Selection' is always null object missing = System.Reflection.Missing.Value; Word._Application wordApp = new Word.Application(); Word._Document aDoc =wordApp.Documents.Open(ref fPath1, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible, ref missing, ref missing, ref missing, ref missing); Word.Selection selection = wordApp.Selection Any ideas on how what I am missing here. Why is wordApp.Selection getting set as null.? Thanks.

    Read the article

  • Eclipse plugin using actionset which will prompt a window for selection,how to do??

    - by Rahul
    *In eclipse plugin using actionSet Here blue icon for some code(using actionset) ,when i click on that it should prompt a window(some popup) which contains two or more link like web links, when i click 1st link it should perform the 1st action and window should disappear so on...Can anyone help me in this how to do that??? See the picture below for reference ..like this with ok button ok should perform the selected action plz help me to do this...??

    Read the article

  • R: How to pass a list of selection expressions (strings in this case) to the subset function?

    - by John
    Here is some example data: data = data.frame(series = c("1a", "1b", "1e"), reading = c(0.1, 0.4, 0.6)) > data series reading 1 1a 0.1 2 1b 0.4 3 1e 0.6 Which I can pull out selective single rows using subset: > subset (data, series == "1a") series reading 1 1a 0.1 And pull out multiple rows using a logical OR > subset (data, series == "1a" | series == "1e") series reading 1 1a 0.1 3 1e 0.6 But if I have a long list of series expressions, this gets really annoying to input, so I'd prefer to define them in a better way, something like this: series_you_want = c("1a", "1e") (although even this sucks a little) and be able to do something like this, subset (data, series == series_you_want) The above obviously fails, I'm just not sure what the best way to do this is?

    Read the article

  • Dom Nodes manipulations, how remove tags which wrap my selection?

    - by sanceray3
    Hi, I try to explain you my "problem". I would like to know when I select a part of text, if this text is “wrapped” by html tags, and in function delete them. For example with this sentence : The car is <strong>green</strong>, and the boat is black If I select “green” and click on a button, I would like verify if green is wrapped by <strong>(for that it’s ok), and in function delete <strong> tags without delete containing “green”. I have tried to do it, but when I remove child and recreate one, my new node is empty and if I try to put directly text in document.createTextNode, my new node appears but the <strong> tags stay. // Bouton CLICK $('input[type=button].btn_transform').click(function(){ var selObj = window.getSelection(); var parent=selObj.anchorNode.parentNode; if (parent.nodeName=='STRONG'){ parent.removeChild(selObj.anchorNode); var theText = document.createTextNode(selObj); parent.appendChild(theText); } }); I’m not a DOM manipulation specialist. Could you help me to solve this? Thanks very much for your precious help.

    Read the article

  • How do I implement a group of strings that starts randomly, but is bound by relevance upon selection?

    - by Freakishly
    Okay the title may be a little confusing, but here's what I'm trying to do :) I have a game in XNA where every tap from the user draws a moving circle on the screen. The circle has a tag, say 'dogs' displayed on it. So imagine multiple taps on the screen, and we have all these circles of various colors and sizes moving around the screen with different (but constant) velocities. Each circle with different tags: 'dogs', 'cats' and so on... Clicking on empty space generates a new circle at that point. Clicking on one of the circles "selects" it, turning it into a greeen shade and slowing its velocity down to a fraction of what it was. Clicking on it again "unselects" it, and restores its original color and velocity (trajectory does not change). With each circle comes a tag, and as of now I'm populating these tags randomly from a string array (which means there's a chance tags will repeat). I would like the tags for newly created circles to be relevant to previous "selected" tags. So when I click on 'dogs', I would like 'German Shepherd' but I would also like 'dog parks' and 'lemurs' assuming dogs get along well with lemurs. What would be the best way to approach this problem. In my head I have a massive many-to-many mapping, but I can't seem to translate it to code. Thanks for looking. FYI I'm using the sample project from here: http://mobile.tutsplus.com/tutorials/windows/introduction-to-xna-on-windows-phone-7/

    Read the article

  • Dropdown selection navigation to different page with dropdown values; Asp.Net + Javascript

    - by fzshah76
    I want to access drop down menu's variable in java script on change event, here is my code <asp:DropDownList ID="DropDownList1" runat="server" onchange="document.location.href = url_Lookbook;" > <asp:ListItem Value="0">hello</asp:ListItem> <asp:ListItem Value="1">world</asp:ListItem> </asp:DropDownList> here is the script coding: <script type="text/javascript"> var url_Lookbook = "http://microsoft.com"; </script> My question is how do I pass down value=0 or value = 1 to different page, any help is appreciated.

    Read the article

  • Codeigniter pre_system hook for DB driven dynamic controller selection - best approach?

    - by Andy
    Although I can tentatively see a solution to this, I was wondering if there may be a glaringly obvious simpler approach. My aim is to use the first segment of a given URI to query the DB as to which controller should be run. I assume I would have to reform the URI with the resultant controller name in segment 1, then allow the system to continue processing as normal (hence a pre_system hook). Although not essential I would also like to hold a couple of other variables from the same DB request to be used later in the call stack, and assume this would have to be done using global variables? Any better suggestions would be gladly received. Thanks.

    Read the article

  • Django: returning a selection of fields from a model based on their values?

    - by AP257
    I am working with some data over which I have little control. I'd like to return ONLY the fields of my model that aren't certain 'uninteresting' values (e.g. '0', 'X' or '-'), and access them individually in the template. My model is like this: class Manors(models.Model): structidx = models.IntegerField(primary_key=True, verbose_name="ID") hills = models.CharField(max_length=100, null=True, blank=True, verbose_name="Number of fields") In my template, I return a QuerySet of Manors, and I'd like to output something like this if the hills field isn't uninteresting: {% for manor in manors %} {% if manor.hills %}<li>Hills blah blah: {{ manor.hills }}</li>{% endif %} {% endfor %} I want to avoid too much logic in the template. Ideally, the manor object would simply not return with the uninteresting fields attached, then I could just do {% if manor.hills %}. I tried writing a model method that returns a dictionary of the interesting values, like this: def get_field_dictionary(self): interesting_fields = {} for field in Manors._meta.fields: if field.value_to_string(self) != "N" and field.value_to_string(self) != "0" and field.value_to_string(self) != "-" and field.value_to_string(self) != "X": interesting_fields[field.name] = field.value_to_string(self) return interesting_fields But I don't know how to access individual values of the dictionary in the template: {% if manor.get_field_dictionary['hills'] %}<li>Hills blah blah: {{ manor.get_field_dictionary['hills'] }}</li>{% endif %} gives a TemplateSyntaxError. Is there a better way to do this?

    Read the article

  • collect string in loop and printout all the string outside loop

    - by user1508163
    I'm newbie here and there is some question that I want have some lesson from you guys. For example: #include <stdio.h> #include<stdlib.h> #include<ctype.h> void main() { char name[51],selection; do { printf("Enter name: "); fflush(stdin); gets(name); printf("Enter another name?(Y/N)"); scanf("%c",&selection); selection=toupper(selection); }while (selection=='Y'); //I want to printout the entered name here but dunno the coding printf("END\n"); system("pause"); } As I know when the loops perform will overwrite the variable then how I perform a coding that will printout all the name user entered? I have already ask my tutor and he is ask me to use pointer, can anyone guide me in this case?

    Read the article

  • jquery - how is multiple selection working in this example?

    - by hatorade
    The relevant snippet of HTML: <span class="a"> <div class="fieldname">Question 1</div> <input type="text" value="" name="q1" /> </span> The relevant jQuery: $.each($('.a'), function(){ $thisField = $('.fieldname', $(this)); }); What exactly is being set to $thisField? If my understanding of multiple selectors in jQuery is correct, it should be grabbing the outer <span> element AND the inner <div> element. But for some reason, if I use $thisField.prepend("hi"); it ends up putting hi right before the text Question 1, but not before <div>. I thought multiple selectors would grab both elements, and that prepend() adds hi to the beginning of BOTH elements, not just the <div>

    Read the article

  • How to take value from radio selection and pass that value into a hidden inputs value attribute?

    - by Matthew
    Hello guys, I need to know if this can be done and if so can someone push me in the right direction. Okay I have a series of radio buttons: <input type="radio" name="level_id" id="radio1" value="XXXX" class="radio1" /> <label for="radio1">choice 1</label> <input type="radio" name="level_id" id="radio2" value="XXXX" class="radio2" /> <label for="radio2">choice 2</label> <input type="radio" name="level_id" id="radio3" value="XXXX" class="radio3" /> <label for="radio3">choice 3</label> <label for="radio4">second choice1</label> <input type="radio" name="level_id" id="radio4" value="1" class="radio4" /> <label for="radio5">second choice2</label> <input type="radio" name="level_id" id="radio5" value="2" class="radio5" /> <label for="radio6">second choice3</label> <input type="radio" name="level_id" id="radio6" value="3" class="radio6" /> Now what I am looking to do is if someone selects CHOICE 1 and then selects SECOND CHOICE1 I would like to pass the value of SECOND CHOICE1 into the value of a hidden input. <input type="hidden" name="sub_source" id="sub_source" value="" /> So that when the form is ready to submit the value that gets passed would be: <input type="hidden" name="sub_source" id="sub_source" value="1" />

    Read the article

  • How can I create dynamically updated views in a tab bar view, based on settings selection?

    - by Diggers
    Hi all, Noob question.... I've created a Tab Bar application. It has four tabs and works fine. Each view is created with a XIB and is effectively static. Each view takes user input and responds on screen. What I need to be able to do is change the input options the user have - in effect remove some UITextFields dependant upon which option the user selects in settings. I've created root.plist and created settings no problem i've also created additional XIBS for the altered UI, but what I don't know how to do, is call these into the tab view controller on demand. Effectively tab one has 3 possible views, tab two 3 possible views etc. But I only want the one that's relevant for the users settings selction to be displayed? Make sense? For reference, if we call the different views - UIInputViewA1, ...A2,....A3 UIInputViewB1,....B2....B3 etc. Hope someone can help, been trawling the net for nights trying to get my head round this. Beggining iPhone Development Bible doesn't help either. If you need any more info, please shout. Cheers Paul.

    Read the article

  • How to implement a tiered "selection tree" in Swing? (Or: is there an existing implementation?)

    - by Sbodd
    I need a Swing component that will let me display a tree-structured list of items, and allow the user to select or de-select an arbitrary subset of those items, with the ability to select or deselect an entire subtree's worth of components by picking that subtree's parent. (Basically, something similar to the Eclipse "Export JAR file's" dialog (an image of the relevant dialog is here - I basically want the "Select resources to export" component, but for a Swing application.) I know I can do this by creating a custom TreeCellRenderer, a custom TreeCellEditor, and a custom TreeModel - but that seems like an awful lot of work. Are there any good off-the-shelf implementations that I can use? Thanks!

    Read the article

  • How to convert my backup.cmd into something I can run in Linux?

    - by blade19899
    Back in the day when i was using windows(and a noob at everything IT) i liked batch scripting so much that i wrote a lot of them and one i am pretty proud of that is my backup.cmd(see below). I am pretty basic with the linux bash sudo/apt-get/sl/ls/locate/updatedb/etc... I don't really know the full power of the terminal. If you see the code below can i get it to work under (Ubuntu)linux :) by rewriting some of the windows code with the linux equivalent (btw:this works under xp/vista/7 | dutch/english) @echo off title back it up :home cls echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» echo º º echo º typ A/B for the options º echo º º echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ echo º º echo º "A"=backup options º echo º º echo º "B"=HARDDISK Options º echo º º echo º º echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ set /p selection=Choose: Goto %selection% :A cls echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» echo º º echo º typ 1 to start that backup º echo º º echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ echo º º echo º "A"=backup options º echo º È1=Documents,Pictures,Music,Videos,Downloads º echo º º echo º "B"=HARDDISK Options º echo º º echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ set /p selection=Choose: Goto %selection% :B cls echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» echo º º echo º typ HD to start the disk check º echo º º echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ echo º º echo º "A"=backup options º echo º º echo º "B"=HARDDISK Options º echo º ÈHD=find and repair bad sectors º echo º º echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ set /p selection=Choose: Goto %selection% :1 cls if exist "%userprofile%\desktop" (set desk=desktop) else (set desk=Bureaublad) if exist "%userprofile%\documents" (set docs=documents) else (set docs=mijn documenten) if exist "%userprofile%\pictures" (set pics=pictures) else (echo cant find %userprofile%\pictures) if exist "%userprofile%\music" (set mus=music) else (echo cant find %userprofile%\music) if exist "%userprofile%\Videos" (set vids=videos) else (echo cant find %userprofile%\videos) if exist "%userprofile%\Downloads" (set down=downloads) else (echo cant find %userprofile%\Downloads) cls echo. examples (D:\) (D:\Backup) (D:\Backup\18-4-2011) echo. echo. if there is no "D:\backup" folder then the folder will be created echo. set drive= set /p drive=storage: echo start>>backup.log echo Name:%username%>>backup.log echo Date:%date%>>backup.log echo Time:%time%>>backup.log echo ========================================%docs%===========================================>>backup.log echo %docs% echo Source:"%userprofile%\%docs%" echo Destination:"%drive%\%username%\%docs%" echo %time%>>backup.log xcopy "%userprofile%\%docs%" "%drive%\%username%\%docs%" /E /I>>Backup.log echo 20%% cls echo ========================================"%pics%"=========================================>>backup.log echo "%pics%" echo Source:"%userprofile%\%pics%" echo Destination:"%drive%\%username%\%pics%" echo %time%>>backup.log xcopy "%userprofile%\%pics%" "%drive%\%username%\%pics%" /E /I>>Backup.log echo 40%% cls echo ========================================"%mus%"=========================================>>backup.log echo "%mus%" echo Source:"%userprofile%\%mus%" echo Destination:"%drive%\%username%\%mus%" echo %time%>>backup.log xcopy "%userprofile%\%mus%" "%drive%\%username%\%mus%" /E /I>>Backup.log echo 60%% cls echo ========================================"%vids%"========================================>>backup.log echo %vids% echo Source:"%userprofile%\%vids%" echo Destination:"%drive%\%username%\%vids%" echo %time%>>backup.log xcopy "%userprofile%\%vids%" "%drive%\%username%\%vids%" /E /I>>Backup.log echo 80%% cls echo ========================================"%down%"========================================>>backup.log echo "%down%" echo Source:"%userprofile%\%down%" echo Destination:"%drive%\%username%\%down%" echo %time%>>backup.log xcopy "%userprofile%\%down%" "%drive%\%username%\%down%" /E /I>>Backup.log echo end>>backup.log echo %username% %date% %time%>>backup.log echo 100%% cls echo backup Compleet copy "backup.log" "%drive%\%username%" del "backup.log" pushd "%drive%\%username%" echo close backup.log to continue with backup script "backup.log" echo press any key to retun to the main menu pause>nul goto :home :HD echo finds and repairs bad sectors echo typ in harddisk letter (C: D: E:) set HD= set /p HD=Hard Disk: chkdsk %HD% /F /R /X pause goto :home

    Read the article

  • Box2D Static-Dynamic body joint eliminates collisions

    - by andrewz
    I have a static body A, and a dynamic body B, and a dynamic body C. A is filtered to not collide with anything, B and C collide with each other. I wish to create a joint between B and A. When I create a joint (ex. revolute), B no longer collides with C - C passes through it as if it does not exist. What am I doing wrong? How can adding a joint prevent a body from colliding with another body it used to? EDIT: I want to join B with A, and have B collide with C, but not A collide with C. In realistic terms, I'm trying to create a revolute joint between a wheel (B) and a wall (A), and have a box (C) hit the wheel and the wheel would then rotate. EDIT: I create a the simplest revolute joint I can with these parameters (C++): b2RevoluteJointDef def; def.Initialize(A, B, B -> GetWorldCenter()); world -> CreateJoint(&def);

    Read the article

  • Friction not working for Vehicle in BulletPhysics

    - by Manmohan Bishnoi
    I am creating a vehicle using bullet-physics engine (v 2.82). I created a ground ( btBoxShape ), a box and a vehicle (following the demo). But friction between ground and vehicle wheels seems not working. As soon as the vehicle is placed in 3d world, it starts moving forward. START : Steering works for the vehicle, but engineForce and brakingForce does not work (i.e. I cannot speed-up or stop the vehicle) : I create physics world like this : void initPhysics() { broadphase = new btDbvtBroadphase(); collisionConfiguration = new btDefaultCollisionConfiguration(); dispatcher = new btCollisionDispatcher(collisionConfiguration); solver = new btSequentialImpulseConstraintSolver(); dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher, broadphase, solver, collisionConfiguration); dynamicsWorld->setGravity(btVector3(0, -9.81, 0)); // Debug Drawer bulletDebugugger.setDebugMode(btIDebugDraw::DBG_DrawWireframe); dynamicsWorld->setDebugDrawer(&bulletDebugugger); //groundShape = new btStaticPlaneShape(btVector3(0, 1, 0), 1); groundShape = new btBoxShape(btVector3(50, 3, 50)); fallShape = new btBoxShape(btVector3(1, 1, 1)); // Orientation and Position of Ground groundMotionState = new btDefaultMotionState(btTransform(btQuaternion(0, 0, 0, 1), btVector3(0, -3, 0))); btRigidBody::btRigidBodyConstructionInfo groundRigidBodyCI(0, groundMotionState, groundShape, btVector3(0, 0, 0)); groundRigidBody = new btRigidBody(groundRigidBodyCI); dynamicsWorld->addRigidBody(groundRigidBody); /////////////////////////////////////////////////////////////////////// // Vehicle Setup /////////////////////////////////////////////////////////////////////// vehicleChassisShape = new btBoxShape(btVector3(1.f, 0.5f, 2.f)); vehicleBody = new btCompoundShape(); localTrans.setIdentity(); localTrans.setOrigin(btVector3(0, 1, 0)); vehicleBody->addChildShape(localTrans, vehicleChassisShape); localTrans.setOrigin(btVector3(3, 0.f, 0)); vehicleMotionState = new btDefaultMotionState(localTrans); //vehicleMotionState = new btDefaultMotionState(btTransform(btQuaternion(0, 0, 0, 1), btVector3(3, 0, 0))); btVector3 vehicleInertia(0, 0, 0); vehicleBody->calculateLocalInertia(vehicleMass, vehicleInertia); btRigidBody::btRigidBodyConstructionInfo vehicleRigidBodyCI(vehicleMass, vehicleMotionState, vehicleBody, vehicleInertia); vehicleRigidBody = new btRigidBody(vehicleRigidBodyCI); dynamicsWorld->addRigidBody(vehicleRigidBody); wheelShape = new btCylinderShapeX(btVector3(wheelWidth, wheelRadius, wheelRadius)); { vehicleRayCaster = new btDefaultVehicleRaycaster(dynamicsWorld); vehicle = new btRaycastVehicle(vehicleTuning, vehicleRigidBody, vehicleRayCaster); // never deactivate vehicle vehicleRigidBody->setActivationState(DISABLE_DEACTIVATION); dynamicsWorld->addVehicle(vehicle); float connectionHeight = 1.2f; bool isFrontWheel = true; vehicle->setCoordinateSystem(rightIndex, upIndex, forwardIndex); // 0, 1, 2 // add wheels // front left btVector3 connectionPointCS0(CUBE_HALF_EXTENT-(0.3*wheelWidth), connectionHeight, 2*CUBE_HALF_EXTENT-wheelRadius); vehicle->addWheel(connectionPointCS0, wheelDirectionCS0, wheelAxleCS, suspensionRestLength, wheelRadius, vehicleTuning, isFrontWheel); // front right connectionPointCS0 = btVector3(-CUBE_HALF_EXTENT+(0.3*wheelWidth), connectionHeight, 2*CUBE_HALF_EXTENT-wheelRadius); vehicle->addWheel(connectionPointCS0, wheelDirectionCS0, wheelAxleCS, suspensionRestLength, wheelRadius, vehicleTuning, isFrontWheel); isFrontWheel = false; // rear right connectionPointCS0 = btVector3(-CUBE_HALF_EXTENT+(0.3*wheelWidth), connectionHeight, -2*CUBE_HALF_EXTENT+wheelRadius); vehicle->addWheel(connectionPointCS0, wheelDirectionCS0, wheelAxleCS, suspensionRestLength, wheelRadius, vehicleTuning, isFrontWheel); // rear left connectionPointCS0 = btVector3(CUBE_HALF_EXTENT-(0.3*wheelWidth), connectionHeight, -2*CUBE_HALF_EXTENT+wheelRadius); vehicle->addWheel(connectionPointCS0, wheelDirectionCS0, wheelAxleCS, suspensionRestLength, wheelRadius, vehicleTuning, isFrontWheel); for (int i = 0; i < vehicle->getNumWheels(); i++) { btWheelInfo& wheel = vehicle->getWheelInfo(i); wheel.m_suspensionStiffness = suspensionStiffness; wheel.m_wheelsDampingRelaxation = suspensionDamping; wheel.m_wheelsDampingCompression = suspensionCompression; wheel.m_frictionSlip = wheelFriction; wheel.m_rollInfluence = rollInfluence; } } /////////////////////////////////////////////////////////////////////// // Orientation and Position of Falling body fallMotionState = new btDefaultMotionState(btTransform(btQuaternion(0, 0, 0, 1), btVector3(-1, 5, 0))); btScalar mass = 1; btVector3 fallInertia(0, 0, 0); fallShape->calculateLocalInertia(mass, fallInertia); btRigidBody::btRigidBodyConstructionInfo fallRigidBodyCI(mass, fallMotionState, fallShape, fallInertia); fallRigidBody = new btRigidBody(fallRigidBodyCI); dynamicsWorld->addRigidBody(fallRigidBody); } I step physics world like this : // does not work vehicle->applyEngineForce(maxEngineForce, WHEEL_REARLEFT); vehicle->applyEngineForce(maxEngineForce, WHEEL_REARRIGHT); // these also do not work vehicle->setBrake(gBreakingForce, WHEEL_REARLEFT); vehicle->setBrake(gBreakingForce, WHEEL_REARRIGHT); // this works vehicle->setSteeringValue(gVehicleSteering, WHEEL_FRONTLEFT); vehicle->setSteeringValue(gVehicleSteering, WHEEL_FRONTRIGHT); dynamicsWorld->stepSimulation(1 / 60.0f, 10); However If I apply brakingForce to all 4 wheels (i.e. including WHEEL_FRONTLEFT and WHEEL_FRONTRIGHT), then my vehicle stops, but keeps sliding/moving forward very very slowly. How do I fix this ?

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >