Cooperation of things within the Virtual world
Hello,
So i wrote a Program where i implemented a STL-Data (Basicly a Matlab created cuboid that should simulate a heating system). Recently i started to use physics in my Program. Code:
viz.setMultiSample(4) The problem that i have now is that the cuboid (who is higher than he is wide) just drops over to the front. What i want it to do tho is to fix that cuboid at the bottom so it basicly simulates an imobile machine. So the question is can i attach that Child to the ground level and make it kinda "heavy" as if a massive metal block would stand there. And on top of that i wanted to figure out a way to attach smaller boxes to it. Basicly if i take a generated box and put it at a certain point of the Big block it gets attached to that point. Code:
box1 = vizshape.addCube(size=0.2, pos=[0,1.45,5.4],alpha=1) Thanks in Advance |
Reducing the bounce of the box may help prevent it from falling over after it's dropped. Here's an example:
Code:
''' |
1 Attachment(s)
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 |
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 |
1 Attachment(s)
Forgot to attach the Screenshot
here we go |
The node.setCenter command will change the object's center of rotation. I'm not sure but it might also help in this case.
|
All times are GMT -7. The time now is 10:45 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC