Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: newton : not function with land (heightmap)  (Read 505 times)
Gamecode
Customers
Community Member
*****
Posts: 367


WWW
« on: October 22, 2007, 03:43:08 AM »

newton : no events if mesh (or vehichle) colide with land (heightmap)

Code:
TerraPMat = .CreateMaterialGroup("terramat")
TerraBody = .CreateStaticTerrainBody(Land)
physics.SetBodyMaterialGroup TerraBody, TerraPMat

physics.SetMaterialInteractionEvents LetadloMAT, TerraPMat, True, True, False

in main loop.


Code:
Dim lngcount
Dim colTemp As TV_EVENT_PHYSICSCOLLISION, lngEventCount As Long
With Physics
lngEventCount = .PollEvents
For lngcount = 0 To lngEventCount - 1
colTemp = .GetEventCollisionDesc(lngcount)


if colide wehichle with all others object, PollEvents return something ... if colide with land NO RETURN ... simply nothing Sad

and if i set others parametters  like : physics.SetMaterialXXX TerraPMat X X X X X  , no changes ... ALL with land not reaging , not pollevents, nothing !
Logged

aiR Captains - RC aircraft project TV65
SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #1 on: October 22, 2007, 05:51:53 AM »

I actually retested it yesterday, and it seemed to work with default physics materials.

So try to keep the default material (Physics.GetDefaultGroupId or sometihng like that) for the landscape. And enable collision events between default and the plane physics material. I tried it on several chunks with different positions and it seemed to report events between the landscape and a falling cube.
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
Gamecode
Customers
Community Member
*****
Posts: 367


WWW
« Reply #2 on: October 22, 2007, 07:37:26 AM »

I actually retested it yesterday, and it seemed to work with default physics materials.

So try to keep the default material (Physics.GetDefaultGroupId or sometihng like that) for the landscape. And enable collision events between default and the plane physics material. I tried it on several chunks with different positions and it seemed to report events between the landscape and a falling cube.


1) "o try to keep the default material" - this ?
Code:
        Physics.SetBodyMaterialGroup TerraBody, Physics.GetDefaultMaterialGroup

2) "enable collision events between default and the plane physics material." - how ?

3) "and it seemed to report events between the landscape and a falling cube." - and vehichle and landscape ?
Logged

aiR Captains - RC aircraft project TV65
Gamecode
Customers
Community Member
*****
Posts: 367


WWW
« Reply #3 on: October 22, 2007, 07:48:34 AM »

Ha its works !
Logged

aiR Captains - RC aircraft project TV65
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks