inertia in gameblender

Game Engine, Players & Web Plug-in, Virtual Reality, support for other engines

Moderators: jesterKing, stiv

Post Reply
3-d hazard
Posts: 0
Joined: Sat Feb 03, 2007 5:48 am

inertia in gameblender

Post by 3-d hazard » Sat Feb 03, 2007 5:55 am

i am currently working on a racing game for blender and i was trying to figure out if there was some way to have inertia for objects in the game engine. ie. when you stop pressing the acceleration button on the car it stops dead still. this can be somewhat annoying and i have not found any tutorials or descriptions or any sort of online documentation on this...

if anyone knows how to achieve this please notify me.
The first dimension:
a place where we can all have fun as infinitely small points on an infinitely thin line...

malCanDo
Posts: 1
Joined: Mon Oct 21, 2002 1:44 pm
Location: Ireland
Contact:

Post by malCanDo » Sat Feb 03, 2007 6:50 pm

Hi there,

You will need to use the great physics engine ( Bullet 2 ) with Blender if you want to have momentum etc.

Have a read over this tutorial, and it'll help explain the difference between direct control over objects, and using the physics engine ( Section 4 and 5 - moving an object using no physics, and using physics ).

http://mediawiki.blender.org/index.php/ ... ame_Engine

Regards...
Mal

3-d hazard
Posts: 0
Joined: Sat Feb 03, 2007 5:48 am

Post by 3-d hazard » Sun Feb 04, 2007 1:20 am

Hey thanks! that works

i'll play around with it now...
The first dimension:
a place where we can all have fun as infinitely small points on an infinitely thin line...

3-d hazard
Posts: 0
Joined: Sat Feb 03, 2007 5:48 am

Post by 3-d hazard » Sun Feb 04, 2007 4:11 am

Well, I have momentum for the car, added in through the force input in the motion action. I encountered another problem of the car still coasting the direction it had been moving even after I turn the car.

it also will continue to coast in that direction after I press reverse and then release the reverse key.

any way to fix this using logic bricks?
The first dimension:
a place where we can all have fun as infinitely small points on an infinitely thin line...

z3r0_d
Posts: 289
Joined: Wed Oct 16, 2002 2:38 am
Contact:

Post by z3r0_d » Mon Feb 05, 2007 7:48 am

there are variations of using linv that will give you close to the effect you desire

[you can send a false pulse to stop motion, or reverse the velocity to bring the vehicle to a stop. It takes a lot of playing, and use of python]

however, then you'd have to do the accelation yourself [if you want acceleration]

DO NOT use DLOC
- the speed depends on framerate [or at least, it used to. Might've been fixed 2.37 or so]
- collisions don't always prevent one object from passing through another

3-d hazard
Posts: 0
Joined: Sat Feb 03, 2007 5:48 am

fixed it again!!!

Post by 3-d hazard » Thu Feb 08, 2007 4:53 am

all right, I fixed it, it actually had to do with the DLoc, once I put a value in there the turning and coasting worked a lot better. The LinV just got rid of all acceleration. I didn't have to use python so I'm happy, because i don't know it!
The first dimension:
a place where we can all have fun as infinitely small points on an infinitely thin line...

Post Reply