Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/20/26 15:57
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
ZorroGPT
by TipmyPip. 04/08/26 17:08
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (Quad, 1 invisible), 3,476 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
juergenwue, VladMak, Geir, ondrej, mredit
19208 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Physics objects stuck inside an invisible box? #99373
11/21/06 00:05
11/21/06 00:05
Joined: Nov 2006
Posts: 2
O
OpusGames Offline OP
Guest
OpusGames  Offline OP
Guest
O

Joined: Nov 2006
Posts: 2
I'm having a weird problem with the physics engine. I'm trying to build a very straight-forward setup with a ball, which I want to push around the level. However, as I move the ball, I quickly hit an invisible box around the ball, preventing movement beyond a small distance. It doesn't matter where I place the ball in the level... the box is always there around the starting position of the ball.

My level consists of only 3 objects: a skybox, a terrain map, and the ball.

Am I missing some settings that are constraining the ball to a bounding box?

I'm including the code I'm using to setup and run the ball:
------------------------------------------------------------------

//**************************************************************
// action for initing and running the ball
//**************************************************************
action aBall_InitAndUpdate ()
{
// setup physics body for the ball
phent_settype(my, PH_RIGID, PH_SPHERE);
phent_setmass(my, 5, PH_SPHERE);
phent_setfriction(my, 50);
phent_setdamping(my, 0, 0);
phent_setelasticity(my, 75, 100);

my.shadow = on;
my.passable = off;

// update loop of the car
while (1)
{
if (key_cuu == ON)
{
phent_addvelcentral(my, vector(-10, 0, 0));
}
if (key_cud == ON)
{
phent_addvelcentral(my, vector(10, 0, 0));
}
if (key_cul == ON)
{
phent_addvelcentral(my, vector(0, -10, 0));
}
if (key_cur == ON)
{
phent_addvelcentral(my, vector(0, 10, 0));
}
if (key_pgup == ON)
{
phent_addvelcentral(my, vector(0, 0, 10));
}
if (key_pgdn == ON)
{
phent_addvelcentral(my, vector(0, 0, -10));
}

wait(1);
}
}
------------------------------------------------------------
Thanks for any help!

-Doug

Re: Physics objects stuck inside an invisible box? [Re: OpusGames] #99374
11/22/06 07:23
11/22/06 07:23
Joined: Nov 2006
Posts: 2
O
OpusGames Offline OP
Guest
OpusGames  Offline OP
Guest
O

Joined: Nov 2006
Posts: 2
To add to my experiments into this problem, I replaced the terrain map I was using with a flat box for the floor. The ball then worked perfectly, as did the car demo I was originally working on.

Thus, the problem seems to come (somehow) from the terrain map I was using. I still have no idea what the problem is, but at least now I can bypass it for the time being....

That being said, any help solving the root of the problem would be greatly appreciated!

-Doug

Re: Physics objects stuck inside an invisible box? [Re: OpusGames] #99375
11/22/06 16:09
11/22/06 16:09
Joined: Jul 2000
Posts: 28,093
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,093
Frankfurt
The latest AUM contains an example with a ball, skybox, and terrain. Have you tried that terrain? I normally can't imagine a reason for the ball to be in an invisible box _unless_ it starts inside the terrain for some reason.


Moderated by  HeelX, Spirit 

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