Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 13,353 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 41 of 41 1 2 39 40 41
Re: Newton 2 wrapper [Re: wrekWIRED] #399988
04/24/12 17:44
04/24/12 17:44
Joined: Apr 2012
Posts: 62
wrekWIRED Offline
Junior Member
wrekWIRED  Offline
Junior Member

Joined: Apr 2012
Posts: 62
How do i add a mesh collision for entities? I tried to edit newton_main.c and the following code.

Code:
#define NEWTON_MESH 8

//add this code to newton_addentity switch

case NEWTON_MESH:
		
collision = NewtonCreateTreeCollision(nworld, 0);
NewtonTreeCollisionBeginBuild(collision);
//newton_treecollisionaddblocks(collision);
newton_treecollisionaddentity(collision, entity);
NewtonTreeCollisionEndBuild(collision, 0);

break;



attach this action to a chair model
Code:
action new_mesh_obj()
{
wait(10);
newton_addentity(me, 100, NEWTON_MESH, onforceandtorque);
}



object collide to it according to it's mesh alright but it stays in mid air or stays in fix position. how do i fix this?

Last edited by wrekWIRED; 04/30/12 07:14.
Re: Newton 2 wrapper [Re: wrekWIRED] #401059
05/12/12 14:53
05/12/12 14:53
Joined: Apr 2012
Posts: 62
wrekWIRED Offline
Junior Member
wrekWIRED  Offline
Junior Member

Joined: Apr 2012
Posts: 62
is it me or these thread is dead? i was able to solv some of my problem like pick objects using joints which leaves me with one last problem which is collision according to it's shape like a chair and other objects. I checked the compound collision code but i made a funny physic as a whole object. Not shure if it's juect the mass i set. I don't even know what unit that mas is set. I just set the mass on newton_addentity according to size like small objects starts with 10 mass and add more as i add bigger object.

Page 41 of 41 1 2 39 40 41

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1