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 (Dico), 16,767 guests, and 5 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
help~~about collision #211743
06/18/08 05:20
06/18/08 05:20
Joined: Jun 2008
Posts: 3
V
vitalele001 Offline OP
Guest
vitalele001  Offline OP
Guest
V

Joined: Jun 2008
Posts: 3
I want to make a small game.One ball is in plank above,Control the plank rotate. Ball is able to roll on the plank,But ball now or passing plank. Or stop not moving in overhead. . Can help me what?

#include <acknex.h>
#include <default.c>

action ball()
{
my->flags &= ~PASSABLE;
ph_setgravity (vector(0, 0, -386));
phent_settype (my, PH_RIGID, PH_SPHERE);
phent_setmass (my, 40, PH_SPHERE);
phent_setfriction (my, 90);
phent_setdamping (my, 70, 70);
phent_setelasticity (my, 50, 40);
my.material = mat_metal;
while(1)
{
camera.x = my.x - 200;
camera.y = my.y;
camera.z = my.z + 200;
camera.tilt = -45;
wait(1);
}
}

action board_rotate()
{
my->flags &= ~PASSABLE;
while(1)
{
if(key_s && my.tilt <= 20)
{
c_rotate(my,vector(0,2*time_step,0),USE_AABB|USE_AXISR);
}
if(key_w && my.tilt >= -20)
{
c_rotate(my,vector(0,-2*time_step,0),USE_AABB|USE_AXISR);
}
if(key_d && my.roll <= 20)
{
c_rotate(my,vector(0,0,2*time_step),USE_AABB|USE_AXISR);
}
if(key_a && my.roll >= -20)
{
c_rotate(my,vector(0,0,-2*time_step),USE_AXISR|USE_AABB);
}
wait(1);
}

}

function main()
{
level_load("game.wmb");
}

Re: help~~about collision [Re: vitalele001] #211766
06/18/08 10:17
06/18/08 10:17
Joined: Feb 2008
Posts: 39
R
RicheyMB2 Offline
Newbie
RicheyMB2  Offline
Newbie
R

Joined: Feb 2008
Posts: 39
The problem may be that the plank is not a physics object.

The manual-
Non-physics objects must not collide with physics objects, but physics objects can collide with non-physics objects.

Re: help~~about collision [Re: RicheyMB2] #211909
06/19/08 01:12
06/19/08 01:12
Joined: Jun 2008
Posts: 3
V
vitalele001 Offline OP
Guest
vitalele001  Offline OP
Guest
V

Joined: Jun 2008
Posts: 3
thx for RicheyMB2
I had attempted to set up a plank becoming the physics marriage partner, but I have wanted floating in empty space with board. If gravity is set up become nullvector. It still may exchange ground. I ought to what physics to use


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