![]() |
|
#1
|
|||
|
|||
Reducing the bounce of the box may help prevent it from falling over after it's dropped. Here's an example:
Code:
''' Press spacebar to enable physics and drop the box ''' import viz import vizact import vizshape import vizinfo viz.go() vizinfo.InfoPanel() viz.clearcolor(viz.SLATE) ground = viz.add('ground.osgb') ground.collidePlane() box = vizshape.addBox(size=(.4,2,0.4),pos=[0,20,8]) shape = box.collideBox() shape.setBounce(0.01) vizact.onkeydown(' ',viz.phys.enable) |
#2
|
|||
|
|||
The problem is not that the boxes drop but the osgb i imported
The Heizung Attribute is a STL data i implemented and edited it with the inspector. The boxes i implemented work perfectly fine they drop and lay staticly on the ground after they fell but the heiz1.osgb (a picture of it is attached) just drops over and i dont know why it does that in first place when i enable the phisycs |
#3
|
|||
|
|||
Hey,
just a quick question to the topic above again. I think i found the problem. Like the Screenshot shows, the center of gravity is at the down left front corner of the object. so i think the physics apply at that point and thats why the object drops so weird on the ground. I found sth about the pivot point in the documentary which defines the the turn axe of the object. Does that point also determines where the physics apply? So i just had to move the point in the screenshot to the center of the object and i guess the problem would be solved. I found the solution in the documentary but all these functions are not shown in my instructor, so my question is how do i move that center of gravity? Sorry to bother you so much but thanks for the help in advance |
#4
|
|||
|
|||
Forgot to attach the Screenshot
here we go |
#5
|
|||
|
|||
The node.setCenter command will change the object's center of rotation. I'm not sure but it might also help in this case.
|
![]() |
Tags |
@jeff |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Augmented Reality: virtual world not overlapping real world correctly | Vaquero | Vizard | 7 | 04-15-2016 01:14 AM |
Making Virtual World Using Video Recording | Hitesh | Vizard | 2 | 06-22-2015 09:03 AM |
Showing another program in a virtual world | Frank Verberne | Vizard | 3 | 01-16-2013 10:26 AM |
why is time faster in my virtual world? | billjarrold | Vizard | 1 | 11-24-2009 05:33 PM |
Vizard as a social virtual world engine | Gerard | Vizard | 3 | 02-14-2008 02:22 PM |