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.
"
sync on
sync rate 30
autocam off
phy start
`make blade
make object box 1,10,10,1
phy make rigid body dynamic box 1
color object 1 ,rgb(255,0,0)
position object 1,20,5,20
ghost object off 1
`make ground
make object box 2,100,1,100
phy make rigid body static box 2
color object 2,rgb (150,123,6)
position object 2, -1000,0,-1000
position camera 50,5,30
point camera object position x(1),object position y(1),object position z(1)
`make balls
for i = 3 to 13
make object sphere i,2
color object i,rgb(rnd(255),rnd(255),rnd(255))
position object i ,rnd(20),30,rnd(20)
phy make rigid body dynamic sphere i
next i
`make container
make object box 20,20,10,1
position object 20,20,5,30
phy make rigid body static box 20
color object 20,rgb (0,0,255)
yrotate object 20,180
ghost object on 20
make object box 21,20,10,1
position object 21,20,5,10
phy make rigid body static box 21
color object 21,rgb (0,0,255)
ghost object on 21
make object box 22,1,10,20
position object 22,10,5,20
phy make rigid body static box 22
color object 22,rgb (0,0,255)
ghost object on 22
make object box 23,1,10,20
position object 23,30,5,20
phy make rigid body static box 22
color object 23,rgb (0,0,255)
ghost object on 23
do
control camera using arrowkeys 0,2,3
yrotate object 1,object angle y(1)+1
phy update
sync
loop