WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Collision and avatar animation (https://forum.worldviz.com/showthread.php?t=3046)

shahramy 10-26-2010 02:48 AM

Collision and avatar animation
 
hi every body
I have an avatar and a little ball in my world. I shoot the ball toward the avatar and I need to notify the collision. every thing is OK until the state of avatar was ordinary (avatar.state(1)). when I changed the state of avatar(using prebuilt animation of avatars) such as lieing on the ground(avatar.state(8)), collision occurred but not true. collision occur like when avatar`s state was 1(avatar.state(1)). the physics for avatar is collideMesh and for ball is collideSphere. I need when the state change to 8, collision do not occur but if the ball hits the lied avatar, collision notify occur.
any body has any idea? please help!!!

Jeff 10-26-2010 09:29 AM

The collideMesh collision shape is not automatically updated when the state of the avatar changes. To make sure the shape matches the avatar you'll need to create a new one each frame and remove the old one using the collideNone command.

shahramy 10-26-2010 11:47 PM

thank you Man. but this takes a lot of CPU power however thanks. you solved my problems


All times are GMT -7. The time now is 06:15 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC