Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / rotating blade in dark physics

Author
Message
bg38
13
Years of Service
User Offline
Joined: 28th Oct 2009
Location:
Posted: 29th Nov 2009 23:26
I was experimenting with dark physics and DBPro earlier, trying to make a rotating blade in a container, that mixes several randomly colored balls around.
I got the ground set as static rigid body, and the walls for the container as well. They work fine when the program is run, and the dynamic balls work great as well.

Here's my question. When making the blade, I tried using the 'phy make rigid body dynamic box 1' command, but the blade would jsut fall thru the ground each time.

I switched to 'phy make rigid body static box 1, and the box stayed put, but not at the coordinates i put in.
It only goes where I want it to if I leave out the phy commands for it.
How would I best be able to have the blade located in the container like in the first pic, ( I can rotate it using
" yrotate object 1,object angle y(1)+1 ",which turns it exactly like I want ), and have it interact with the spheres?

blade set with no phy commands, rotates perfectly


blade set as 'dynamic rigid body


and blade set as static rigid body


and here's the code I'm using to make the demo.



"
Duke E
13
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 30th Nov 2009 00:49
You have two options as i see it.

Option one is making the "blender" a rigid body dynamic object then set it as a kinematic object "phy set rigid body kinematic ID, 1". What that means is the "blender" will not move as a physics object, you have to move it with a command. But it will still interact with the ball objects in the container. You have to set the rotation on the Y axis yourself with "phy set rigid body kinematic rotation" continusly. Possible problems: Beware of rotating the "blender" too fast though. As i wrote recently in another post if you move any physics object manually so it penetrates the surface of another too much it will make for very unpredictable repelling forces, and your ball objects will fly away at lightspeed probably right trough the container.

Method two is having the "blender" as a rigid body dynamic also (never set a moving object as a static), but have it on a rotating joint, look in to "Phy Make Revolute Joint". You could attach the joint to the floor or another static object to represent an axle. Then continusly setting the "blender" object to rotate with "Phy Set Rigid Body Angular velocity" in a controlled manner, check the velocity of the "blender" rotation now and then and add more velocity if it falls below a threshold value. This would probably be the slickest way but not as easy to implement as method one.

Regards
bg38
13
Years of Service
User Offline
Joined: 28th Oct 2009
Location:
Posted: 30th Nov 2009 01:36
ahh, thanks a lot I'll give these suggestions a shot.

Login to post a reply

Server time is: 2023-01-28 06:59:03
Your offset time is: 2023-01-28 06:59:03