Gamestudio Links
Zorro Links
Newest Posts
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, VoroneTZ, 1 invisible), 1,578 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Problems with bounding boxes #217947
07/25/08 17:42
07/25/08 17:42
Joined: Mar 2008
Posts: 67
crumply Offline OP
Junior Member
crumply  Offline OP
Junior Member

Joined: Mar 2008
Posts: 67


As you can see from above, my ball that rolls using the physics engine in lite-c interacts fine with the square boxes, however, a slope doesn't work because the bounding box remains the same as with a normal cube.

How do I change this? Am I going about this the wrong way?

Re: Problems with bounding boxes [Re: crumply] #217948
07/25/08 17:46
07/25/08 17:46
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
are those boxes and slope physics objects or not? have you tried with c_setminmax (but i'm not sure if that will help)

have you set the tilt angle of slope in wed or through the code in sed?



Ubi bene, ibi Patria.
Re: Problems with bounding boxes [Re: croman] #217949
07/25/08 17:55
07/25/08 17:55
Joined: Mar 2008
Posts: 67
crumply Offline OP
Junior Member
crumply  Offline OP
Junior Member

Joined: Mar 2008
Posts: 67
I'm using Lite-C free so i have no WED wink

the bounding boxes are set with:

wait(1);
c_updatehull(my,1);

and that does pretty much the same as c_setminmax from my experience.

Re: Problems with bounding boxes [Re: crumply] #217950
07/25/08 17:58
07/25/08 17:58
Joined: Jan 2007
Posts: 221
F
Fenriswolf Offline
Member
Fenriswolf  Offline
Member
F

Joined: Jan 2007
Posts: 221

Re: Problems with bounding boxes [Re: Fenriswolf] #217952
07/25/08 18:02
07/25/08 18:02
Joined: Mar 2008
Posts: 67
crumply Offline OP
Junior Member
crumply  Offline OP
Junior Member

Joined: Mar 2008
Posts: 67
Ok that's cool, that's the collisions sorted. The thing now is that my ball only used to roll in one dimension (because it's a 2d platformer) but now it rolls all over the place!

How do I restrict a physics-object to one 2 dimensions?

Re: Problems with bounding boxes [Re: crumply] #218113
07/26/08 14:28
07/26/08 14:28
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
Code:
while((my.tilt<-30)||(my.tilt>30)||(my.roll>30)||(my.roll<-30))
{
while((my.tilt<-30)||(my.tilt>30)||(my.roll>30)||(my.roll<-30))
{
phent_settype( me, 0, 0 );

if(my.tilt<-20)
{
my.tilt += 10 * time;
}
if(my.tilt>20)
{
my.tilt -= 5 * time;
}
if(my.roll<-20)
{
my.roll += 10 * time;
}
if(my.roll>20)
{
my.roll -= 10 * time;
}
wait(1);
}
phent_settype(me, PH_RIGID, PH_BOX);
wait(1);
}



try with this. if you dont need tilt restrictions just remove it. i'm not sure if this is the best way but it works...



Ubi bene, ibi Patria.
Re: Problems with bounding boxes [Re: croman] #218158
07/26/08 18:27
07/26/08 18:27
Joined: Apr 2008
Posts: 437
dracula Offline
Senior Member
dracula  Offline
Senior Member

Joined: Apr 2008
Posts: 437
Hey crumply,

I hope this is work towards the 3rd of your great tutorial series ??

Cheers

drac.


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