#1
|
|||
|
|||
Remove link and have object drop/collide?
Hello,
Is there an easy way to remove a link, but then have the object drop and collide with other objects? For example: a user picks up an object, a link is created with viz.grab(foo,bar), and when they right click, the link is removed with link.remove(). Is it possible for that object to fall to the ground/collide with another object (table, floor, etc.) without manually setting the position? Currently, it floats in mid-air. Thanks in advance! |
#2
|
|||
|
|||
Hello;
am facing that problem too and i have nother one maybe you could help me, i need to know the object under the mouse, so that i can grab it, any idea? thanks in advance |
#3
|
|||
|
|||
Please don't hijack this thread. Thanks.
|
#4
|
|||
|
|||
You will need to enable the physics engine in order to have collisions between objects and the effects of gravity. The Vizard docs explain how to add physics.
|
#5
|
|||
|
|||
Quote:
Here's a bit of what I'm working with: Code:
viz.phys.enable() room.collidePlane() if link and checkobject(object) == 'foobar': foobar.collideBox(1,2.5,1) #hits the ground link.remove() Thanks again. |
#6
|
|||
|
|||
Have you tried applying a collide mesh to the room model?
Code:
room.collideMesh() room.disable( viz.DYNAMICS ) |
#7
|
|||
|
|||
Quote:
This worked great in combination with collideBox() Thanks again! |
|
|