Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (dr_panther, Ayumi, 7th_zorro), 877 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 5 1 2 3 4 5
Re: Newbie Question [Re: A.Russell] #27648
06/06/04 22:47
06/06/04 22:47
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Quote:

Also, is there a way to stop the entity from spinning?




Set phent_maxspeed(linMax,Null) and this will limit the entities linear speed to linMax and it's Rotational speed to Zero.

Quote:

constaint1[3]=1,0,0; //only allows movement on x axis?





That's right...so if your "chute" isn't lined up right, you'll get odd effects indeed.

Quote:

phcon_setparams1(constraint1, vector(1,0,0),nullvector,nullvector); // I thought that the second agument of this set the contraint axis?





I"m sorry Russel...constraint1 is the problem, but I gave you the wrong solution.

constraint1=phcon_add(ph_slider, my, 0);

There that should do it. Forget that constraint vector buisness, you are right; vector() is constraint axis. Sorry for the confusion.

Re: Newbie Question [Re: fastlane69] #27649
06/06/04 23:13
06/06/04 23:13
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan

constraint1=phcon_add(ph_slider, my, 0);

Heh, I actually had that before. I'll set phent_maxspeed, and with any luck that'll do it.

Re: Newbie Question [Re: A.Russell] #27650
06/07/04 18:52
06/07/04 18:52
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
pjhent_setmaxspeed didn't do anything. It still rotates around. When a ball hits the ball luncher, it gets bumped around to the wrong angle, and then goes all to hell bouncing and twirling all over the place.

To tell the truth, I don't understand about things like velocities and torque, so I probably have a few other settings off:

Code:
function init_ball_launcher()

{

var constraint1[3];

phent_settype(my, ph_rigid, ph_box);
constraint1=phcon_add(ph_slider, my, 0);
phent_setmaxspeed(my,10000,null); //this doesn't stop rotation (I tried with other values too)

phcon_setparams1(constraint1, vector(1,0,0),nullvector,nullvector); //limit movement to the x axis
phcon_setparams2(constraint1, vector(-50,0,0),nullvector,nullvector); //can't (shouldn't be able) to move more than 50 quants

while(my!=null)
{

temp.x=-spring;//The amount of force to move the ball launcher
temp.y=-1600000;//maximum force for the ball launcher
temp.z=0
//punch ball out chute
//should make it so that it moves back and forth in 1 second intervals
//seems to work okay until the ball launcher hits a ball and rotates around
phcon_setmotor(constraint1, temp, nullvector, nullvector);
sleep(0.5);
temp.y-=temp.x;
phcon_setmotor(constraint1, temp, nullvector, nullvector);
sleep(0.5);
}
}






Last edited by A.Russell; 06/07/04 19:26.
Re: Newbie Question [Re: A.Russell] #27651
06/07/04 21:23
06/07/04 21:23
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
a) phent_setmaxspeed(my,10000, nullvector );

b) keep constraint1 like you had it before; eliminate all instances of it being a vector (ie replace all constraint1[3] with just constraint1. This is a leftover from my mistaken solution.

Re: Newbie Question [Re: fastlane69] #27652
06/07/04 23:39
06/07/04 23:39
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
Okay, I've done those two things. I actually did try it with nullvector, but it didn't work. For a start it does what it is supposed to, but eventually the balls knock the launcher over and it goes wonky:



Last edited by A.Russell; 06/07/04 23:40.
Re: Newbie Question [Re: A.Russell] #27653
06/08/04 20:36
06/08/04 20:36
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan

I take it that it isn't possible to stop the rotation then. I'll just do away with the launcher and keep applying the force directly.

Re: Newbie Question [Re: A.Russell] #27654
06/11/04 17:42
06/11/04 17:42
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan

I'm getting back to making the spinners. I'm finding this very difficult, and don't really know how to approach it.

The spinners are not motorised, they should simply spin when balls hit them.

Here is a picture of the entity for the spinners:



Last edited by A.Russell; 06/11/04 17:43.
Re: Newbie Question [Re: A.Russell] #27655
06/12/04 13:13
06/12/04 13:13
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan

I attempted to make the spinner from a hinge. It doesn't move at all. I assigned the spinner entities this action:

Code:
action init_spinner

{
var constraint2;

phent_settype(my, ph_rigid, ph_poly); //ph_poly -polygonal collision?
constraint2=phcon_add(ph_hinge, my, 0); //a hinge would be all that is needed in case, right?

phent_setmass(my, 0.5, ph_poly); //lighter than a ball
phent_setfriction(my, 10); //not much friction

phcon_setparams1(constraint2, my.x,vector(0,0,1),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);
}

}



I've commented what I thought I was doing.

EDIT> Nevermind, fixed it. Amazing what a lunch break can do.



Last edited by A.Russell; 06/12/04 14:03.
Re: Newbie Question [Re: A.Russell] #27656
06/13/04 20:59
06/13/04 20:59
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan

The spinners sometimes get knocked over by the balls if they are moving fast enough, like the ball launcher was. So, I'll try my luck again. Is there any way to stop this?

Re: Newbie Question [Re: A.Russell] #27657
07/22/04 23:42
07/22/04 23:42
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan


Just to make certain. Does the physics system only work with the new collision system (collisions with models polygons rather than collision hull)?

Page 4 of 5 1 2 3 4 5

Moderated by  HeelX, Spirit 

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