Viewpoint Developer Central    Viewpoint Forums    Viewpoint Forums  Hop To Forum Categories  Adobe Atmosphere    Problem about collision in atmosphere
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
<June>
Posted
I created an object in 3D max, after I imported it into atmosphere,the collision function was disabled: my avatar can go though the wall all the way although the collision function was setted. anybody can tell me how to make the collision function work properly ? thank you !
 
Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of Preacherman
Posted Hide Post
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);
	}
 
Posts: 7 | Registered: March 12, 2003Reply With QuoteEdit or Delete MessageReport This Post
<June>
Posted
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);
 
Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 

Viewpoint Developer Central    Viewpoint Forums    Viewpoint Forums  Hop To Forum Categories  Adobe Atmosphere    Problem about collision in atmosphere