Gamestudio Links
Zorro Links
Newest Posts
bestwinsite
by winsite3. 05/30/24 04:10
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (TipmyPip), 679 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Hinge #31851
08/11/04 03:51
08/11/04 03:51

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Hi, I have got A6 Pro and i cant work out how to make a hinge work can any one give me some code.
thanx for any help.

Re: Hinge [Re: ] #31852
08/11/04 22:04
08/11/04 22:04
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline
Expert
A.Russell  Offline
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
Here's mine:

Code:

function init_spinner
{

var constraint2;

phent_settype(my, ph_rigid, ph_poly); //-polygonal collision
constraint2=phcon_add(ph_hinge, my, 0);

phent_setmass(my, 0.5, ph_poly); //lighter than a ball
phent_setfriction(my, 20); //not much friction
phent_setmaxspeed(my,1000,null);
phent_setdamping(my, 0, 20);


phcon_setparams1(constraint2, my.x,vector(0,1,0),nullvector); //anchor point (origin is in centre of entity)
phcon_setparams2(constraint2, vector(360,-360,0),nullvector,nullvector); //can spin all the way around



while(my!=null) //didn't know if a loop was neccessary, so threw it in just in case
{
wait(1);
}

}



If you can make one that doesn't leave it's constraints and fly all over the screen, please tell me how you manage it.

Last edited by A.Russell; 08/11/04 22:36.
Re: Hinge [Re: A.Russell] #31853
08/12/04 00:49
08/12/04 00:49

A
Anonymous
Unregistered
Anonymous
Unregistered
A



thnx 4 the code. but how do i assign it to my models?

Re: Hinge [Re: ] #31854
08/12/04 01:58
08/12/04 01:58
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline
Expert
A.Russell  Offline
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan


You need to call it from an action.

Code:
   action spinner
{
my.bright=on;
my.flare=on;
init_spinner();
}



Seriously though, hinge is buggy. Good luck with it.


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