Viewpoint Forums
Viewpoint Forums
Adobe Atmosphere
Problem about collision in atmosphere|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Member |
Atmosphere's default collision will not work with Viewpoint objects. Attach the following script to an imported Viewpoint Object to create a physical model from it and specify collision. Much more information about various options can be found in the Adobe Javascript API.
if(this.type == "ViewpointObject")
{
this.timestep = function(n, d)
{
if(this.loaded)
{
this.pm = this.createConvexPhysicalModel(0);
this.pm.collide = true;
removeAnimator(this);
}
}
addAnimator(this);
}
|
|||
|
| <June>
|
Thank you Preacherman, I try to use the below javascript, it workes:
teapot = new Object(); //land is some name, may be another teapot.viewpointObject = this; teapot.timestep = function(){ if (this.viewpointObject.loaded){ teapotPM = this.viewpointObject.createPhysicalModel(0); teapotPM.collide = true; removeAnimator(this); } } addAnimator(teapot); |
||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|
Viewpoint Forums
Viewpoint Forums
Adobe Atmosphere
Problem about collision in atmosphere
