Giving an object an initial velocity ...

My goal is to use the GE to create IPOs for Blender animation rendering. Ive read the GE tutorials and this beast seems powerful … but the available docs on the Wiki seem woefully short to give me the info I am looking for.

At this point, I am looking to give a rigid body object an initial velocity so that when the game starts, it has some initial speed. Does anyone know how to achieve this effect?

Neil

Yes this information would be nice to know… As i am in need to make a lot of demolitions for future film projects… need to set initial speeds for spinning cars, meteorites and whatever they need…

Well, you could give the object that’s gonna crush a keybord sensor that will move the object at the desired linear velocity when that key is pressed, then start the GE, press that key only once and that would be it (the objetc must be dynamic and rigid body too). The rest would be turning on the bake animation to ipo on the game menu at the top.

You could have a property called ‘init’

So when init is 0, give the object a strong force using the force actuator and set init to 1 so it doesn’t continue.

Maybe example blend? :S

The first picture shows the blocks for auto-start one cube object and then stop it. This is a simple demo and doesnt have logic for time, etc.

The second just shows auto-starting a cube forever.

Hope that helps

Ps. It often helps to look at other .blends here and in the WIP, and the tuts for the GE, and the downloads on blender.org, the test files they run on each new blender release.

Think about what you need to do, and how you would use the logic blocks to do it. In this case, after the GE started you wanted an object to move by itself?

So, looking at the list of sensors, which one looks like it might work? from here one thing leads to another. smile. Reading this may help with the logic blocks and a few other things. Its old but was updated this year. Well some it was.

Good luck

Attachments


Why not just use an always sensor which has the pulse button unselected? It would be simpler wouldnt it? Takes about 20 seconds to set up.

http://img529.imageshack.us/img529/1476/initialfa9.th.jpg

The arrow points to the button which should be turned off. This means that only one pulse will be sent initially when the game starts. The sensor is connected to a motion actuator which of course has a motion assigned.

So basically when the game starts the object will move with a initial motion.

Ummm, I said that, lol.

No, actually you didn’t. Your image shows the “TRUE level triggereing (pulse mode)” button still turned on, and you did not explain at any point that it should be turned off.

kolban and Eradicor: Since you are doing physics simulations, I assume your object is Dynamic. Do what AD-Edge showed in the image if you want the initial velocity to be set at startup and not continually applied.

I would recommend that you use the LinV settings with the “Add” button turned on. When the “Add” button is turned off, LinV is in “Set” mode, but it will not set a value of 0,0,0 (there is a reason, I just won’t explain it right now).

If you turn on the “L” button, the initial velocity will be applied along the object’s local axes, but if the “L” button is off, the velocity will be applied on the global axes.

The three settings in the LinV are X,Y, and Z (from left to right), and they correspond with the red, green, and blue axes in the modeling window respectively. A positive X value causes motion in the direction of the red arrow, a negative X value causes motion in the opposite direction.

Friction and dampening will affect the object once the simulation begins, so if you need the velocity to be constant, I would suggest leaving “TRUE Level triggering (pulse mode)” turned on, and using LinV in “Set” instead of “Add” (“Add” will add the given velocity every frame, “Set” will keep it constant according to your settings, but it will be on all axes, so a Z setting of 0 will defy gravity).

Cyborg Dragon’s got it, even if you have the pulse mode off on an always actuator, it still moves. Try it.

even if you have the pulse mode off on an always actuator, it still moves. Try it.
But thats the whole point, we want the object to move. With the pulse mode off however it will only apply the force initially. Which again is the whole point - of this thread.
What we dont want is for the object to have the force applyed to it constantly, every frame. Turning it off fixes that.

Thanks blendenzo for explaining it all in more detail. I didnt think of using LinV

blendenzo, lol, right you are, bad slink…