Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by M_D. 04/26/24 20:22
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 839 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 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