Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (7th_zorro, Quad, VoroneTZ, 1 invisible), 623 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 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 | chip programmers | 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