Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,574 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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